1 5 package net.sourceforge.jwebunit.util; 6 7 import java.io.PrintStream ; 8 import java.io.PrintWriter ; 9 10 15 16 public class ExceptionWrapper extends RuntimeException { 17 private Throwable thrown; 18 19 public ExceptionWrapper(Throwable t) { 20 thrown = t; 21 } 22 23 public Throwable fillInStackTrace() { 24 return thrown == null? null : thrown.fillInStackTrace(); 25 } 26 27 public String getMessage() { 28 return thrown.getMessage(); 29 } 30 31 public String getLocalizedMessage() { 32 return thrown.getLocalizedMessage(); 33 } 34 35 public String toString() { 36 return thrown.toString(); 37 } 38 39 public void printStackTrace() { 40 thrown.printStackTrace(); 41 } 42 43 public void printStackTrace(PrintStream s) { 44 thrown.printStackTrace(s); 45 } 46 47 public void printStackTrace(PrintWriter s) { 48 thrown.printStackTrace(s); 49 } 50 } 51 | Popular Tags |