1 4 package com.tc.aspectwerkz.compiler; 5 6 import java.io.PrintStream ; 7 import java.io.PrintWriter ; 8 9 14 public class CompileException extends Exception { 15 private Throwable nested; 16 17 public CompileException(String msg, Throwable e) { 18 super(msg); 19 nested = e; 20 } 21 22 public void printStackTrace() { 23 printStackTrace(System.err); 24 } 25 26 public void printStackTrace(PrintWriter writer) { 27 super.printStackTrace(writer); 28 if (nested != null) { 29 writer.println("nested:"); 30 nested.printStackTrace(writer); 31 } 32 } 33 34 public void printStackTrace(PrintStream out) { 35 super.printStackTrace(out); 36 if (nested != null) { 37 out.println("nested:"); 38 nested.printStackTrace(out); 39 } 40 } 41 } | Popular Tags |