Skip to content

Catch errors that can be thrown by registered schema providers #323#324

Merged
JPinkney merged 2 commits intoredhat-developer:masterfrom
apupier:323-catchThrownErrorInOtherExtensions
Jul 24, 2020
Merged

Catch errors that can be thrown by registered schema providers #323#324
JPinkney merged 2 commits intoredhat-developer:masterfrom
apupier:323-catchThrownErrorInOtherExtensions

Conversation

@apupier
Copy link
Copy Markdown
Member

@apupier apupier commented Jul 22, 2020

in case, one of the registered is throwing an error, it avoids to break
the other registered ones.

Signed-off-by: Aurélien Pupier apupier@redhat.com

…-developer#323

in case, one of the registered is throwing an error, it avoids to break
the other registered ones.

Signed-off-by: Aurélien Pupier <apupier@redhat.com>
matches.push(uri);
}
} catch (error) {
console.log(`Error thrown while requesting schema ` + error);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there an output channel where this error can be logged? or we keep it at console level so only developers will see it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to have output channel, we need provide, as much as possible, information when something goes wrong.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is better to handle it in a separate PR as it is a distinct feature to have an outputchannel. i created #327

@apupier apupier requested review from JPinkney and evidolob July 22, 2020 16:10
Comment thread test/schemaProvider.test.ts Outdated
Comment thread test/schemaProvider.test.ts Outdated
Comment thread test/schemaProvider.test.ts Outdated
Co-authored-by: Josh Pinkney <Joshpinkney@gmail.com>
Copy link
Copy Markdown
Collaborator

@evidolob evidolob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@apupier
Copy link
Copy Markdown
Member Author

apupier commented Jul 24, 2020

I will be on PTO for 3 weeks. Feel free to modify/merge and release a new version with it :-)

@JPinkney
Copy link
Copy Markdown
Contributor

@apupier I've approved and now I'll merge. Have a good PTO!

@JPinkney JPinkney merged commit 2dfb3d5 into redhat-developer:master Jul 24, 2020
@JPinkney
Copy link
Copy Markdown
Contributor

Actually I'm going to revert and instead merge #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants