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