|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException com.lowagie.text.ExceptionConverter
public class ExceptionConverter
The ExceptionConverter changes a checked exception into an unchecked exception.
Constructor Summary | |
---|---|
ExceptionConverter(java.lang.Exception ex)
Construct a RuntimeException based on another Exception |
Method Summary | |
---|---|
static java.lang.RuntimeException |
convertException(java.lang.Exception ex)
Convert an Exception into an unchecked exception. |
java.lang.Throwable |
fillInStackTrace()
requests to fill in the stack trace we will have to ignore. |
java.lang.Exception |
getException()
and allow the user of ExceptionConverter to get a handle to it. |
java.lang.String |
getLocalizedMessage()
and make sure we also produce a localized version |
java.lang.String |
getMessage()
We print the message of the checked exception |
void |
printStackTrace()
we have to override this as well |
void |
printStackTrace(java.io.PrintStream s)
here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:" |
void |
printStackTrace(java.io.PrintWriter s)
Again, we prefix the stack trace with "ExceptionConverter:" |
java.lang.String |
toString()
The toString() is changed to be prefixed with ExceptionConverter |
Methods inherited from class java.lang.Throwable |
---|
getCause, getStackTrace, initCause, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExceptionConverter(java.lang.Exception ex)
ex
- the exception that has to be turned into a RuntimeExceptionMethod Detail |
---|
public static final java.lang.RuntimeException convertException(java.lang.Exception ex)
ex
- the exception to convert
public java.lang.Exception getException()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getLocalizedMessage()
getLocalizedMessage
in class java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Throwable
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream s)
printStackTrace
in class java.lang.Throwable
s
- public void printStackTrace(java.io.PrintWriter s)
printStackTrace
in class java.lang.Throwable
s
- public java.lang.Throwable fillInStackTrace()
fillInStackTrace
in class java.lang.Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |