If we are to catch specific forms of IOException
, or any other kind as a
matter of fact, and we only try and catch a couple (and define definitive outputs for them) say
FileNotFoundException
ZipException
should we always trail it off and cover all bases with a
catch(IOException e){
e.printStackTrace();
}
and then possibly go even further and catch Exception e
, or is this a
complete waste of time?
Generally, you only want to catch and handle exceptions you can do something with at a low level. Then at a higher level, catch any unhandled exceptions system wide, so you can record errors that occurred.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With