Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » [javadoc | source]
com.lowagie.text
public class: ExceptionConverter [javadoc | source]
java.lang.Object
   java.lang.Throwable
      java.lang.Exception
         java.lang.RuntimeException
            com.lowagie.text.ExceptionConverter

All Implemented Interfaces:
    Serializable

The ExceptionConverter changes a checked exception into an unchecked exception.
Constructor:
 public ExceptionConverter(Exception ex) 
    Construct a RuntimeException based on another Exception
    Parameters:
    ex - the exception that has to be turned into a RuntimeException
Method from com.lowagie.text.ExceptionConverter Summary:
fillInStackTrace,   getException,   getLocalizedMessage,   getMessage,   printStackTrace,   printStackTrace,   printStackTrace,   toString
Methods from java.lang.Throwable:
fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.ExceptionConverter Detail:
 public Throwable fillInStackTrace() 
    requests to fill in the stack trace we will have to ignore. We can't throw an exception here, because this method is called by the constructor of Throwable
 public Exception getException() 
    and allow the user of ExceptionConverter to get a handle to it.
 public String getLocalizedMessage() 
    and make sure we also produce a localized version
 public String getMessage() 
    We print the message of the checked exception
 public  void printStackTrace() 
    we have to override this as well
 public  void printStackTrace(PrintStream s) 
    here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:"
 public  void printStackTrace(PrintWriter s) 
    Again, we prefix the stack trace with "ExceptionConverter:"
 public String toString() 
    The toString() is changed to be prefixed with ExceptionConverter