1 8 package com.tc.backport175; 9 10 import java.io.PrintStream ; 11 import java.io.PrintWriter ; 12 13 18 public class ReaderException extends RuntimeException { 19 22 private Throwable m_originalException; 23 24 29 public ReaderException(final String message) { 30 super(message); 31 } 32 33 39 public ReaderException(String message, Throwable throwable) { 40 super(message); 41 m_originalException = throwable; 42 } 43 44 47 public void printStackTrace() { 48 printStackTrace(System.err); 49 } 50 51 56 public void printStackTrace(PrintStream ps) { 57 super.printStackTrace(ps); 58 if (m_originalException != null) { 59 m_originalException.printStackTrace(ps); 60 } 61 } 62 63 68 public void printStackTrace(PrintWriter pw) { 69 super.printStackTrace(pw); 70 if (m_originalException != null) { 71 m_originalException.printStackTrace(pw); 72 } 73 } 74 } | Popular Tags |