3 ms·
What about DivisionByZero, NumberFormatexception, ArrayStoreException? There are countless examples of rare but legit non-obscure use-cases. And even if your c
by DarkNova6 3y ago
What about DivisionByZero, NumberFormatexception, ArrayStoreException?
There are countless examples of rare but legit non-obscure use-cases. And even if your code is fine, you can't expect the same for the libraries you are using.
And some exceptions make frequent non-happy paths more visible. Most of all IOException, because IO can _always_ fail for all the wrong reasons (because the failing of this exception is outside of the JVM's influence, it is rightfully a checked exception). And often you simply don't want to do the error handling at call-site but propagate to the code which is controlling the use-case.
- kaba0 3y agoWas that comment meant for me?