public class ChainedTip { public static void main(String args[]) { try { foo(); } catch(TipException e) { e.PRintStackTrace(); } }
public static void foo() throws TipException { try { FileInputStream in = new FileInputStream("not.there"); } catch (IOException e) { throw new TipException(e); } } } tips.TipException: java.io.FileNotFoundException: not there (The system cannot find the file specified) at tips.ChainedTip.foo(ChainedTip.java:21) at tips.ChainedTip.main(ChainedTip.java:9) Caused by: java.io.FileNotFoundException: not.there (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.〈init〉(FileInputStream.java:103) at java.io.FileInputStream.〈init〉(FileInputStream.java:66) at tips.ChainedTip.foo(ChainedTip.java:18) ... 1 more