1 21 22 package org.dbunit; 23 24 import java.io.PrintStream ; 25 import java.io.PrintWriter ; 26 27 31 public class DatabaseUnitException extends Exception 32 { 33 private final Throwable _e; 34 35 39 public DatabaseUnitException() 40 { 41 super(); 42 _e = null; 43 } 44 45 49 public DatabaseUnitException(String msg) 50 { 51 super(msg); 52 _e = null; 53 } 54 55 59 public DatabaseUnitException(String msg, Throwable e) 60 { 61 super(msg); 62 _e = e; 63 } 64 65 69 public DatabaseUnitException(Throwable e) 70 { 71 super(e.toString()); 72 _e = e; 73 } 74 75 78 public Throwable getException() 79 { 80 return _e; 81 } 82 83 86 89 public void printStackTrace() 90 { 91 super.printStackTrace(); 92 if (_e != null) 93 _e.printStackTrace(); 94 } 95 96 99 public void printStackTrace(PrintStream s) 100 { 101 super.printStackTrace(s); 102 if (_e != null) 103 _e.printStackTrace(s); 104 } 105 106 109 public void printStackTrace(PrintWriter s) 110 { 111 super.printStackTrace(s); 112 if (_e != null) 113 _e.printStackTrace(s); 114 } 115 116 } 117 118 119 120 121 | Popular Tags |