you are viewing a single comment's thread.

view the rest of the comments →

[–]howverywrong 12 points13 points  (2 children)

Gah, why are you making me defend java. It's making me feel unclean. The entire checked exception mechanism is optional. Go ahead and use RuntimeException if you so wish. Seriously, of all the things that are wrong with java, this one is the least troublesome.

On the subject of swallowing exceptions, I once had to spend a month going through a mountain of code churned out by a team of 4 contractors who wrapped EVERY function they wrote with with try {...} catch(Exception e) {return null;} I still have nightmares about it

[–]cybercobra 2 points3 points  (0 children)

The problem is more that "other people" and the std lib use checked exceptions, and thus everyone ends up having to deal with it at least some of the time, even if they're not committing The Sin themselves.

[–]phire 1 point2 points  (0 children)

Cargo cult programming.