1 2 12 package com.versant.core.jdo.tools.enhancer; 13 14 import java.util.*; 15 16 import java.lang.reflect.*; 17 import java.io.*; 18 19 23 public class VerifyException extends Exception { 24 25 private Throwable exception; 26 27 30 public VerifyException(String msg, Throwable exception) { 31 super(msg); 32 this.exception = exception; 33 } 34 35 38 public VerifyException(String msg) { 39 this(msg, null); 40 } 41 42 45 public VerifyException(Throwable exception) { 46 this(exception.getMessage(), exception); 47 } 48 49 52 public Throwable getException() { return exception; } 53 54 57 public void printStackTrace(PrintStream s) { 58 super.printStackTrace(s); 59 if (exception != null) { 60 s.println("Chained exception:"); 61 exception.printStackTrace(s); 62 } 63 } 64 65 68 public void printStackTrace(PrintWriter s) { 69 super.printStackTrace(s); 70 if (exception != null) { 71 s.println("Chained exception:"); 72 exception.printStackTrace(s); 73 } 74 } 75 76 } 77 | Popular Tags |