3 ms·
Actually, I’d argue that exception (that are caught) should only be used for recoverable errors. If you can’t recover, then you should crash.
by baby 7y ago
Actually, I’d argue that exception (that are caught) should only be used for recoverable errors. If you can’t recover, then you should crash.
- munificent 7y agoThe great thing about exceptions is that they implement both of these behaviors with a single mechanism. For recoverable errors, you catch. For unrecoverable ones, you don't. The exception throwing mechanism unwinds the entire stack and crashes the app with a helpful stack trace.
- baby 7y agoTrue!