-
Notifications
You must be signed in to change notification settings - Fork 54
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
Handle errors coming from LS responses for completion items #1039
Handle errors coming from LS responses for completion items #1039
Conversation
@@ -137,6 +137,9 @@ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int | |||
if (isIncomplete) { | |||
anyIncomplete.set(true); | |||
} | |||
}).exceptionally(t -> { | |||
LanguageServerPlugin.logError("'%s' LS failed to compute completion items.".formatted(w.serverDefinition.label), t); //$NON-NLS-1$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not need an if such as
if (!CancellationUtil.isRequestCancelledException(e)) { // do not report error if the server has cancelled the request
here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point :-) Corrected...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@@ -137,6 +137,11 @@ public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int | |||
if (isIncomplete) { | |||
anyIncomplete.set(true); | |||
} | |||
}).exceptionally(t -> { | |||
if (!CancellationUtil.isRequestCancelledException(t)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need now lines 152-154?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No those lines are not needed any more indeed. Corrected as well
Thanks |
Fixes #1038