|
|
|
|
|
by piaste
1335 days ago
|
|
UnreachableException has no special behaviour at all [0]. It's just a standardized 'tag' around regular Exception. The only advantage of using a standard tag is that it will be recognized by other programmers, and maybe some supporting tooling might choose to give it special treatment. E.g. a code analyzer could warn you if you raise a NotImplementedException (forgot to finish a feature?), but accept an UnreachableException as valid. If you want to add a custom name (for easier grepping maybe?) or stuff some extra data in the exception, you can still inherit from UnreachableException. [0] https://github.com/dotnet/runtime/pull/63922/files#diff-588c... |
|