1 17 24 package org.pentaho.util; 25 26 import java.io.PrintStream ; 27 28 31 public class PentahoChainedException extends RuntimeException { 32 33 36 private static final long serialVersionUID = -2278229062123864979L; 37 38 40 public PentahoChainedException() { 41 super(); 42 } 43 44 50 public PentahoChainedException(String message) { 51 super(message); 52 } 53 54 62 public PentahoChainedException(String message, Throwable reas) { 63 super(message, reas); 64 } 65 66 72 public PentahoChainedException(Throwable reas) { 73 super(reas); 74 } 75 76 77 80 public Throwable getRootCause() { 81 Throwable aReason = this; 82 Throwable lastReason = null; 83 while ((aReason != null) ) { 84 lastReason = aReason; 85 aReason = aReason.getCause(); 86 } 87 return (aReason != null) ? aReason : lastReason; 88 } 89 90 93 public synchronized void printStackTrace(java.io.PrintWriter pw) { 94 super.printStackTrace(pw); 95 } 96 97 100 public synchronized void printStackTrace(PrintStream ps) { 101 super.printStackTrace(ps); 102 } 103 104 } 105 | Popular Tags |