Catching multiple exceptions in java is now very easy starting from Java 7. Before java 7 we used to write the below code for catching multiple exceptions
1 2 3 4 5 6 7 8 9 |
try{ //Some Statements }catch(Exception1 e1 |){ //log statements }catch(Exception2 e2){ //log statements }catch(Exception3 e3){ //log statements } |