4 ms·
> Alas, many caught it and wrapped it in a generic RuntimeException. Actually sounded great right up until this point. Deal with it, or explicitly acknowledge
by flir 2y ago
> Alas, many caught it and wrapped it in a generic RuntimeException.
Actually sounded great right up until this point. Deal with it, or explicitly acknowledge that you do not. It's honest.
Apparently other developers are why we can't have nice things.
- mrkeen 2y agoIt's already very unlikely that you can 'recover-and-proceed' in the context of any business app exception (Security violation, customer not found, no such payment, etc.). So what's left in exception handling is logging and/or rethrowing. And the 'nasty hackish way' of doing it (RuntimeException) already passes a complete stack trace up to the caller.
- wavemode 2y ago"recover and proceed" generally means "log the error and then continue processing on other data, rather than exiting entirely" Lots of different kinds of software tends to follow this pattern - web servers, data pipelines, compilers/build tools, etc.