Class NestedRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.fop.render.afp.exceptions.NestedRuntimeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RendererRuntimeException
Handy class for wrapping runtime Exceptions with a root cause.
This technique is no longer necessary in Java 1.4, which provides
built-in support for exception nesting. Thus exceptions in applications
written to use Java 1.4 need not extend this class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct aNestedRuntimeExceptionwith the specified detail message.NestedRuntimeException(String msg, Throwable t) Construct aNestedRuntimeExceptionwith the specified detail message and nested exception. -
Method Summary
Modifier and TypeMethodDescriptionReturn the detail message, including the message from the nested exception if there is one.Gets the original triggering exceptionvoidPrint the composite message and the embedded stack trace to the specified stream.voidPrint the composite message and the embedded stack trace to the specified writer.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NestedRuntimeException
Construct aNestedRuntimeExceptionwith the specified detail message.- Parameters:
msg- The detail message.
-
NestedRuntimeException
Construct aNestedRuntimeExceptionwith the specified detail message and nested exception.- Parameters:
msg- The detail message.t- The nested exception.
-
-
Method Details
-
getUnderlyingException
Gets the original triggering exception- Returns:
- The original exception as a throwable.
-
getMessage
Return the detail message, including the message from the nested exception if there is one.- Overrides:
getMessagein classThrowable- Returns:
- The detail message.
-
printStackTrace
Print the composite message and the embedded stack trace to the specified stream.- Overrides:
printStackTracein classThrowable- Parameters:
ps- the print stream
-
printStackTrace
Print the composite message and the embedded stack trace to the specified writer.- Overrides:
printStackTracein classThrowable- Parameters:
pw- the print writer
-