“throws Exception” on your method.
And then in main:
try { // whatever } catch (Exception e) { System.out.println("Oops!"); }