3 ms·
> Most of exceptions are unrecoverable (that's why they are called exceptions), the best course of action is to crash, which happens by default. This is why D
by WalterBright 4y ago
> Most of exceptions are unrecoverable (that's why they are called exceptions), the best course of action is to crash, which happens by default.
This is why D separates exceptions into two categories:
1. Error - these are not recoverable. The only reason to catch them is to maybe try to save some state or log a message or shut down the reactor before crashing.
2. Exception - these are recoverable
(I'm being facetious. Any system design where, while unwinding a fatal error, one relies on it to shut down the reactor is a horrible, terrible design.)