package us.deans.panther; /** Converts a checked exception into an unchecked exception for propagating across numerous calls. */ public class ppExceptionChannel extends RuntimeException { private static final long serialVersionUID = 1L; private final Exception ex; public ppExceptionChannel(Exception ex){ this.ex = ex; } public Exception getException(){ return ex; } public String getMessage(){ return ex.getMessage(); } public String getLocalizedMessage(){ return ex.getLocalizedMessage(); } public String toString(){ return "ExceptionChannel: " + ex; } public void printStackTrace(){ printStackTrace(System.err); } public void printStackTrace(java.io.PrintStream s){ synchronized(s){ s.print(getClass().getName() + ": "); s.print(ex.getStackTrace()); } } }