More fault handling cleanup#59097
Open
jasonmalinowski wants to merge 3 commits into
Open
Conversation
a958bba to
8197c61
Compare
This was referenced Jan 28, 2022
8197c61 to
275c552
Compare
JoeRobich
reviewed
Feb 3, 2022
| /// <returns><see langword="false"/> to avoid catching the exception.</returns> | ||
| [DebuggerHidden] | ||
| public static bool ReportAndPropagateUnlessCanceled(Exception exception, CancellationToken contextCancellationToken, ErrorSeverity severity) | ||
| public static bool ReportAndPropagateUnlessCanceled(Exception exception, ErrorSeverity severity, CancellationToken contextCancellationToken) |
Member
There was a problem hiding this comment.
Did 'Change Signature' make this easy?
Member
Author
There was a problem hiding this comment.
It did! Although sometimes it did nothing at all, and my effort to debug that kept resulting in the debugger breaking. 😄
d196377 to
e609476
Compare
This comment was marked as outdated.
This comment was marked as outdated.
e609476 to
5827aea
Compare
Everything has to be categorized from now on.
Otherwise these are using the "regular" error reporting which will send non-fatal events.
5827aea to
0b5e47b
Compare
JoeRobich
approved these changes
Feb 9, 2022
Member
|
Could you please elaborate on how severities were chosen in general? |
Member
Author
|
@RikkiGibson Oh, forgot to update the PR for that. PR description updated now. |
jmarolf
approved these changes
Feb 9, 2022
sharwell
suggested changes
Feb 10, 2022
| Visit(m); | ||
| } | ||
| catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e)) | ||
| catch (Exception e) when (FatalError.ReportAndPropagateUnlessCanceled(e, ErrorSeverity.General)) |
Contributor
There was a problem hiding this comment.
ErrorSeverity.General should be the default. This coding pattern is unnecessarily burdensome.
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.
Commit-by-commit recommended. For the addition of severities, they were chosen based on the rough criteria described for each option:
roslyn/src/Compilers/Core/Portable/InternalUtilities/FatalError.cs
Lines 260 to 286 in 0b5e47b