class BoringLectureException extends Exception { public BoringLectureException() { super(); } public BoringLectureException( String errorMessage ) { super( errorMessage ); } } class NewExceptionTest { public static void dullSpeaker() throws BoringLectureException { // Code can go here throw new BoringLectureException( "Change Topics" ); } public static void main( String args[] ) { try { dullSpeaker(); } catch ( BoringLectureException e ) { System.err.println( "Error: Time to " + e.getMessage() ); } } }