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.
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 orEnvironment.FailFast()being called.I have several code paths in some of my analyzer and source generator projects where throwing
UnreachableExceptionis the obvious thing to do, but the type isnet7.0only.