I have a method which throws subclasses of Exception. If I am performing the same catch functionality for each sub-class of Exception that’s causght is it bad practice to just catch the Exceptions class or should I catch each exception individually ?
Share
Yes, it’s bad practice, because it makes the catch block catch runtime exceptions that shouldn’t be caught.
If you use Java 7, you can use