3 ms·
Doing anything other than a crash is often sub-optimal, in my experience. Such error handling code is usually untested, which is another way of saying 'buggy'.
by bryanlarsen 10y ago
Doing anything other than a crash is often sub-optimal, in my experience.
Such error handling code is usually untested, which is another way of saying 'buggy'. It almost always swallows useful information, like the backtrace. It sometimes lets program execution continue in a messed up state, causing very strange and hard to debug errors later on.
Certainly Rust makes it a lot harder to mess up error handling code than the languages I'm used to but in general I'm definitely in the 'all exceptions fatal' camp.
- nitrogen 10y agoAn exception to the exception rule IMO is a program that is managing many internal tasks at once, and the failure of one should not bring down the others. For example, a program that is coordinating many IoT devices should not fail if one of those devices cannot be contacted.
- notduncansmith 10y agoIn the case of unreliable network peers, it isn't really "exceptional" that they be unreachable. It should just be represented as data.