|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.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.
Field Summary | |
---|---|
private Exception |
ex
we keep a handle to the wrapped exception |
private String |
prefix
prefix for the exception |
private static long |
serialVersionUID
|
Constructor Summary | |
---|---|
ExceptionConverter(Exception ex)
Construct a RuntimeException based on another Exception |
Method Summary | |
---|---|
static RuntimeException |
convertException(Exception ex)
Convert an Exception into an unchecked exception. |
Throwable |
fillInStackTrace()
requests to fill in the stack trace we will have to ignore. |
Exception |
getException()
and allow the user of ExceptionConverter to get a handle to it. |
String |
getLocalizedMessage()
and make sure we also produce a localized version |
String |
getMessage()
We print the message of the checked exception |
void |
printStackTrace()
we have to override this as well |
void |
printStackTrace(PrintStream s)
here we prefix, with s.print(), not s.println(), the stack trace with "ExceptionConverter:" |
void |
printStackTrace(PrintWriter s)
Again, we prefix the stack trace with "ExceptionConverter:" |
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 |
Field Detail |
---|
private static final long serialVersionUID
private Exception ex
private String prefix
Constructor Detail |
---|
public ExceptionConverter(Exception ex)
ex
- the exception that has to be turned into a RuntimeExceptionMethod Detail |
---|
public static final RuntimeException convertException(Exception ex)
ex
- the exception to convert
public Exception getException()
public String getMessage()
getMessage
in class Throwable
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
public String toString()
toString
in class Throwable
public void printStackTrace()
printStackTrace
in class Throwable
public void printStackTrace(PrintStream s)
printStackTrace
in class Throwable
s
- public void printStackTrace(PrintWriter s)
printStackTrace
in class Throwable
s
- public Throwable fillInStackTrace()
fillInStackTrace
in class Throwable
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |