void (String[] args) { try { throwStuff(); } catch (NumberFormatException nfe) { System.out.println("ERROR 2:" + nfe.getMessage()); System.exit(1); } catch (IOException | IllegalArgumentException ioe) { System.out.println("ERROR:" + ioe.getMessage()); System.exit(1); } }