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

Improvements for Assumed.Unreachable(...) #11155

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

DustinCampbell
Copy link
Member

This change is a follow-up to #11144 (comment) that addresses two issues that may help with diagnosis:

  1. Assumed.Unreachable(...)captures the [CallerFilePath] and [CallerLineNumber] but didn't do anything with them. Now, those values are appended to the exception message.
  2. Two Assumed.Unreachable(...) overloads have been added to allow a custom exception message to be provided that can be used to add more detail about a failure.

This change addresses two issues that may help with diagnosis:

1. `Assumed.Unreachable(...)`captures the `[CallerFilePath]` and `[CallerLineNumber]` but didn't do anything with them. Now, those values are appended to the exception message.
2. Two `Assumed.Unreachable(...)` overloads have been added to allow a custom exception message to be provided that can be used to add more detail about a failure.
@DustinCampbell DustinCampbell requested review from a team as code owners November 5, 2024 16:56
@DustinCampbell DustinCampbell merged commit ca2c656 into dotnet:main Nov 5, 2024
12 checks passed
@DustinCampbell
Copy link
Member Author

Thanks all!

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.

6 participants