4 ms·
whatever, the point is exception allows and encourages people to catch less and more than they should
by bedobi 3y ago
whatever, the point is exception allows and encourages people to catch less and more than they should
- vips7L 3y agoSometimes top level code needs to do this. It's not always wrong. It's not always black and white in programming.
- bedobi 3y ago> Sometimes top level code needs to do this come on, it's not as if anyone disagrees with that, but that's extremely, extremely rare, overwhelmingly, callers are just dealing things like with UserNotFoundException, NullPointerException, what have you, and there's no reason why the compiler should happily let you catch Exception (or nothing) when it could just be giving you an honest object back
- wewtyflakes 3y agoIt has not been extremely/overwhelmingly rare in my experience. Further still, within the context of Java, exceptions are objects.