try { myRoutine(); } catch (myException exceptionVariable) { System.out.println("Error Message:" + exceptionVariable.data); }