Package org.exolab.adaptx.util
Class NestedRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.exolab.adaptx.util.NestedRuntimeException
- All Implemented Interfaces:
Serializable
A RuntimeException class which can hold another Exception.
Very useful when reporting deep errors that occur in
methods that have no defined exception reporting.
- Version:
- $Revision: 3633 $ $Date: 2003-03-01 08:38:44 +0100 (Sat, 01 Mar 2003) $
- Author:
- Keith Visco
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNestedRuntimeException
(Exception exception) Creates a new NestedRuntimeException with the given exception.NestedRuntimeException
(String message) Creates a new NestedRuntimeException with the given messageNestedRuntimeException
(String message, Exception exception) Creates a new NestedRuntimeException with the given message and exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the nested exception for this NestedRuntimeException.void
Prints the stack trace for this exceptionvoid
printStackTrace
(PrintStream stream) Prints the stack trace for this exceptionvoid
printStackTrace
(PrintWriter writer) Prints the stack trace for this exceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
NestedRuntimeException
Creates a new NestedRuntimeException with the given message- Parameters:
message
- the error message for this NestedRuntimeException
-
NestedRuntimeException
Creates a new NestedRuntimeException with the given message and exception.- Parameters:
message
- the error message for this NestedRuntimeExceptionexception
- the Exception which caused the error.
-
NestedRuntimeException
Creates a new NestedRuntimeException with the given exception.- Parameters:
exception
- the Exception which caused the error.
-
-
Method Details
-
getException
Returns the nested exception for this NestedRuntimeException.- Returns:
- the nested exception, or null if no nested exception exists.
-
printStackTrace
public void printStackTrace()Prints the stack trace for this exception- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
Prints the stack trace for this exception- Overrides:
printStackTrace
in classThrowable
- Parameters:
stream
- the PrintStream to print the stack trace to.
-
printStackTrace
Prints the stack trace for this exception- Overrides:
printStackTrace
in classThrowable
- Parameters:
writer
- the PrintWriter to print the stack trace to.
-