public class ExceptionTest1 { public ExceptionTest1(){ try { test(); } catch (TestException ex) { ex.printStackTrace(); } } private void test() throws TestException { try { throw new InterruptedException(); } catch (InterruptedException ex) { throw new TestException(ex); } } public static void main(String[] args){ new ExceptionTest1(); } }