Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

apupier
Copy link
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 [email protected]

…-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 <[email protected]>
matches.push(uri);
}
} catch (error) {
console.log(`Error thrown while requesting schema ` + error);
Copy link
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
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
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

test/schemaProvider.test.ts Outdated Show resolved Hide resolved
test/schemaProvider.test.ts Outdated Show resolved Hide resolved
test/schemaProvider.test.ts Outdated Show resolved Hide resolved
Copy link
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
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
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
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