1 29 package net.sourceforge.groboutils.util.throwable.v1; 30 31 32 import java.io.PrintStream ; 33 import java.io.PrintWriter ; 34 35 36 43 public class ChainableException extends Exception 44 implements IChainableException 45 { 46 49 private ChainableExceptionHelper ceh; 50 51 52 public ChainableException() 53 { 54 super(); 55 this.ceh = new ChainableExceptionHelper( this ); 56 } 57 58 59 public ChainableException( String message ) 60 { 61 super( message ); 62 this.ceh = new ChainableExceptionHelper( this ); 63 } 64 65 66 public ChainableException( Throwable cause ) 67 { 68 super(); 69 this.ceh = new ChainableExceptionHelper( this, cause ); 70 } 71 72 73 public ChainableException( Throwable cause, String message ) 74 { 75 this( message, cause ); 76 } 77 78 79 public ChainableException( String message, Throwable cause ) 80 { 81 super( message ); 82 this.ceh = new ChainableExceptionHelper( this, cause ); 83 } 84 85 86 109 public synchronized Throwable getCause() 110 { 111 return this.ceh.getCause(); 112 } 113 114 115 139 public synchronized Throwable initCause( Throwable cause ) 140 { 141 return this.ceh.initCause( cause ); 142 } 143 144 145 151 public void printStackTrace( PrintStream ps ) 152 { 153 this.ceh.printStackTrace( ps ); 154 } 155 156 157 158 164 public void printStackTrace( PrintWriter pw ) 165 { 166 this.ceh.printStackTrace( pw ); 167 } 168 } 169 170 | Popular Tags |