Class NestedRuntimeException

All Implemented Interfaces:
Serializable

public class NestedRuntimeException extends 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:
  • Constructor Details

    • NestedRuntimeException

      public NestedRuntimeException(String message)
      Creates a new NestedRuntimeException with the given message
      Parameters:
      message - the error message for this NestedRuntimeException
    • NestedRuntimeException

      public NestedRuntimeException(String message, Exception exception)
      Creates a new NestedRuntimeException with the given message and exception.
      Parameters:
      message - the error message for this NestedRuntimeException
      exception - the Exception which caused the error.
    • NestedRuntimeException

      public NestedRuntimeException(Exception exception)
      Creates a new NestedRuntimeException with the given exception.
      Parameters:
      exception - the Exception which caused the error.
  • Method Details

    • getException

      public 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 class Throwable
    • printStackTrace

      public void printStackTrace(PrintStream stream)
      Prints the stack trace for this exception
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      stream - the PrintStream to print the stack trace to.
    • printStackTrace

      public void printStackTrace(PrintWriter writer)
      Prints the stack trace for this exception
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      writer - the PrintWriter to print the stack trace to.