Do not throw exception if LanguageDebugInfoService.GetDataTipInfoAsync do not run to completion#1926
Merged
dsyme merged 2 commits intodotnet:masterfrom Dec 5, 2016
Conversation
7db3634 to
34fdf1f
Compare
Contributor
|
@vasily-kirichenko Yes I'm pretty certain we should remove it, and just use the same helper everywhere. |
Contributor
|
@vasily-kirichenko Please merge with master, thanks I think we should also review the 2-3 commits where @OmarTawfik and I added the logic for I suppose if we're going to implicity throw exceptions away we should be more explicit about it, and add an assert (except for OperationCanceledException) so we know it's happening in debug mode. |
…c do not run to completion
… them to Assert.Exception instead of reraising
34fdf1f to
b02f6b3
Compare
Contributor
Author
|
@dsyme Done. I've just removed |
Contributor
|
🎉 |
nosami
pushed a commit
to xamarin/visualfsharp
that referenced
this pull request
Jan 26, 2022
…c do not run to completion (dotnet#1926) * do not throw exception if LanguageDebugInfoService.GetDataTipInfoAsync do not run to completion * CommonRoslynHelpers.StartAsyncAsTask catches exceptions and transform them to Assert.Exception instead of reraising
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #1915
Basically, it turned out we should not (re) throw exceptions if the task has not run to completion. Previously, we ran the async computation with
StartAsyncAsTaskhttps://github.com/Microsoft/visualfsharp/blob/master/vsintegration/src/FSharp.Editor/CommonRoslynHelpers.fs#L31I'm not sure I understand why we have that
elsebranch where we throw the base exception. Could anybody explain this? Should we remove it as it may cause other code misbehavior?