java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.lowagie.text.ExceptionConverter
- All Implemented Interfaces:
Serializable
Deprecated.
The ExceptionConverter changes a checked exception into an unchecked exception.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Construct a RuntimeException based on another Exception -
Method Summary
Modifier and TypeMethodDescriptionstatic final RuntimeExceptionDeprecated.Convert an Exception into an unchecked exception.Deprecated.requests to fill in the stack trace we will have to ignore.Deprecated.and allow the user of ExceptionConverter to get a handle to it.Deprecated.and make sure we also produce a localized versionDeprecated.We print the message of the checked exceptionvoidDeprecated.we have to override this as wellvoidprintStackTrace(PrintStream printStream) Deprecated.here we prefix, with printStream.print(), not printStream.println(), the stack trace with "ExceptionConverter:"voidprintStackTrace(PrintWriter printWriter) Deprecated.Again, we prefix the stack trace with "ExceptionConverter:"toString()Deprecated.The toString() is changed to be prefixed with ExceptionConverterMethods inherited from class java.lang.Throwable
addSuppressed, getCause, getStackTrace, getSuppressed, initCause, setStackTrace
-
Constructor Details
-
ExceptionConverter
Deprecated.Construct a RuntimeException based on another Exception- Parameters:
ex- the exception that has to be turned into a RuntimeException
-
-
Method Details
-
convertException
Deprecated.Convert an Exception into an unchecked exception. Return the exception if it is already an unchecked exception or return an ExceptionConverter wrapper otherwise- Parameters:
ex- the exception to convert- Returns:
- an unchecked exception
- Since:
- 2.1.6
-
getException
Deprecated.and allow the user of ExceptionConverter to get a handle to it.- Returns:
- the original exception
-
getMessage
Deprecated.We print the message of the checked exception- Overrides:
getMessagein classThrowable- Returns:
- message of the original exception
-
getLocalizedMessage
Deprecated.and make sure we also produce a localized version- Overrides:
getLocalizedMessagein classThrowable- Returns:
- localized version of the message
-
toString
Deprecated.The toString() is changed to be prefixed with ExceptionConverter -
printStackTrace
public void printStackTrace()Deprecated.we have to override this as well- Overrides:
printStackTracein classThrowable
-
printStackTrace
Deprecated.here we prefix, with printStream.print(), not printStream.println(), the stack trace with "ExceptionConverter:"- Overrides:
printStackTracein classThrowable- Parameters:
printStream- printStream
-
printStackTrace
Deprecated.Again, we prefix the stack trace with "ExceptionConverter:"- Overrides:
printStackTracein classThrowable- Parameters:
printWriter- printWriter
-
fillInStackTrace
Deprecated.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- Overrides:
fillInStackTracein classThrowable- Returns:
- a Throwable
-