logoalt Hacker News

speed_spread11/08/20242 repliesview on HN

The problem is that most of the time, errors are not to be handled but only bubbled up. I've also seen it in Java with checked exceptions: the more explicit error handling is, the more developers feel they should somehow try to do _something_ with the error when the correct thing to do would actually be to fail in the most straightforward manner. The resulting code is often much heavier than necessary because of this and the stacktraces also get polluted by overwrapping.


Replies

Mawr11/09/2024

The problem with the opposite is, since everything gets invisibly bubbled up to the top, you are not able to tell what errors do need to be handled. You only find those out from runtime failures and that's no good if you care about reliability.

show 1 reply
mikeschinkel11/10/2024

Sounds like a lack of good code review.

show 1 reply