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

UnreachableException polyfill #60

Open
alexrp opened this issue Feb 15, 2023 · 1 comment · May be fixed by #89
Open

UnreachableException polyfill #60

alexrp opened this issue Feb 15, 2023 · 1 comment · May be fixed by #89

Comments

@alexrp
Copy link

alexrp commented Feb 15, 2023

This exception is not really intended to be caught as it being thrown indicates that something has gone horribly wrong, like a Debug.Assert() failing or Environment.FailFast() being called.

I have several code paths in some of my analyzer and source generator projects where throwing UnreachableException is the obvious thing to do, but the type is net7.0 only.

@dnperfors
Copy link

I have a separate package for this, but I am willing to include it in pollysharp.. (https://github.com/dnperfors/unreachableexception/)

0xced added a commit to 0xced/PolySharp that referenced this issue Nov 8, 2023
The System.Diagnostics.UnreachableException.cs file was not actually auto-generated (see Sergio0694#88).

Fixes Sergio0694#60
@0xced 0xced linked a pull request Nov 8, 2023 that will close this issue
0xced added a commit to 0xced/PolySharp that referenced this issue Nov 22, 2024
The System.Diagnostics.UnreachableException.cs file was not actually auto-generated (see Sergio0694#88).

Fixes Sergio0694#60
0xced added a commit to 0xced/PolySharp that referenced this issue Nov 22, 2024
The System.Diagnostics.UnreachableException.cs file was not actually auto-generated (see Sergio0694#88).

Fixes Sergio0694#60
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 a pull request may close this issue.

2 participants