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:
java.io.Serializable
public class NestedRuntimeException extends java.lang.RuntimeException
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NestedRuntimeException(java.lang.Exception exception)
Creates a new NestedRuntimeException with the given exception.NestedRuntimeException(java.lang.String message)
Creates a new NestedRuntimeException with the given messageNestedRuntimeException(java.lang.String message, java.lang.Exception exception)
Creates a new NestedRuntimeException with the given message and exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Exception
getException()
Returns the nested exception for this NestedRuntimeException.void
printStackTrace()
Prints the stack trace for this exceptionvoid
printStackTrace(java.io.PrintStream stream)
Prints the stack trace for this exceptionvoid
printStackTrace(java.io.PrintWriter writer)
Prints the stack trace for this exception
-
-
-
Constructor Detail
-
NestedRuntimeException
public NestedRuntimeException(java.lang.String message)
Creates a new NestedRuntimeException with the given message- Parameters:
message
- the error message for this NestedRuntimeException
-
NestedRuntimeException
public NestedRuntimeException(java.lang.String message, java.lang.Exception exception)
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
public NestedRuntimeException(java.lang.Exception exception)
Creates a new NestedRuntimeException with the given exception.- Parameters:
exception
- the Exception which caused the error.
-
-
Method Detail
-
getException
public java.lang.Exception 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 classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintStream stream)
Prints the stack trace for this exception- Overrides:
printStackTrace
in classjava.lang.Throwable
- Parameters:
stream
- the PrintStream to print the stack trace to.
-
printStackTrace
public void printStackTrace(java.io.PrintWriter writer)
Prints the stack trace for this exception- Overrides:
printStackTrace
in classjava.lang.Throwable
- Parameters:
writer
- the PrintWriter to print the stack trace to.
-
-