1 8 package org.codehaus.aspectwerkz.compiler; 9 10 import java.io.PrintStream ; 11 import java.io.PrintWriter ; 12 13 18 public class CompileException extends Exception { 19 private Throwable nested; 20 21 public CompileException(String msg, Throwable e) { 22 super(msg); 23 nested = e; 24 } 25 26 public void printStackTrace() { 27 printStackTrace(System.err); 28 } 29 30 public void printStackTrace(PrintWriter writer) { 31 super.printStackTrace(writer); 32 if (nested != null) { 33 writer.println("nested:"); 34 nested.printStackTrace(writer); 35 } 36 } 37 38 public void printStackTrace(PrintStream out) { 39 super.printStackTrace(out); 40 if (nested != null) { 41 out.println("nested:"); 42 nested.printStackTrace(out); 43 } 44 } 45 } | Popular Tags |