1 16 17 package org.apache.commons.jelly.util; 18 19 import java.io.PrintStream ; 20 import java.io.PrintWriter ; 21 22 39 40 public class NestedRuntimeException extends RuntimeException { 41 42 46 private Throwable cause = null; 47 48 55 public NestedRuntimeException(Throwable cause) { 56 super(cause.getMessage()); 57 this.cause = cause; 58 } 59 60 68 public NestedRuntimeException(String msg, Throwable cause) { 69 super(msg); 70 this.cause = cause; 71 } 72 73 public Throwable getCause() { 74 return cause; 75 } 76 77 public void printStackTrace() { 78 cause.printStackTrace(); 79 } 80 81 public void printStackTrace(PrintStream out) { 82 cause.printStackTrace(out); 83 } 84 85 public void printStackTrace(PrintWriter out) { 86 cause.printStackTrace(out); 87 } 88 89 } 90 | Popular Tags |