java catch 2 exception code example
Example: java catch multiple exceptions
catch(IOException | SQLException ex){
logger.error(ex);
throw new MyException(ex.getMessage());
}
catch(IOException | SQLException ex){
logger.error(ex);
throw new MyException(ex.getMessage());
}