-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add additional information when we throw an 'unreachable' exception #64402
Conversation
get { return new InvalidOperationException("This program location is thought to be unreachable."); } | ||
} | ||
internal static Exception Unreachable([CallerFilePath] string? path = null, [CallerLineNumber] int line = 0) | ||
=> new InvalidOperationException($"This program location is thought to be unreachable. File='{path}' Line={line}"); |
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.
this is the actual update to the helper property to be a helper method.
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.
Signing off on the helper change; and obviously not looking at the remaining 455 files. 😄
@dotnet/roslyn-compiler for this change to help diagnosability of watson dumps for exceptions. |
ack. did not intend to merge this. |
Talking to infra now. |
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.
LGTM Thanks (iteration 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.
Compiler changes LGTM
Thanks guys. Sorry for the accidental merge! |
We've been getting "unreachable" exceptions that we're finding to difficult to take action on due to trouble determining what the actual throw point of hte exception was. This adds that information to the exception, in a similar way to how we added information to our Contract calls so that devs investigating the issue could track the exception back to the exact location it was thrown.