Compoze Software, Inc.

com.compoze.util
Class NestedRuntimeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.compoze.util.NestedRuntimeException
All Implemented Interfaces:
java.io.Serializable

public abstract class NestedRuntimeException
extends java.lang.RuntimeException
implements java.io.Serializable

This class is a runtime exception that wraps another exception. Any nested exception traces are included when the stack trace is printed. Contrast this with NestedException, which is a similar exception but checked.

See Also:
NestedException, Serialized Form

Constructor Summary
NestedRuntimeException()
          Constructor.
NestedRuntimeException(java.lang.Exception e)
          Constructor.
NestedRuntimeException(java.lang.Exception e, java.lang.String sMessage)
          Constructor.
NestedRuntimeException(java.lang.String sMessage)
          Constructor.
NestedRuntimeException(java.lang.Throwable t)
          Constructor.
NestedRuntimeException(java.lang.Throwable t, java.lang.String sMessage)
          Constructor.
 
Method Summary
 java.lang.Throwable getNestedRuntimeException()
          Get the nested exception.
 void printStackTrace()
          Print stack trace of this exception and the underlying exception if available.
 void printStackTrace(java.io.PrintStream printStream)
          Print stack trace of this exception and the underlying exception if available.
 void printStackTrace(java.io.PrintWriter writer)
          Print stack trace of this exception and the underlying exception if available.
 java.lang.String toString()
          Create a string representation of the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedRuntimeException

public NestedRuntimeException()
Constructor.

NestedRuntimeException

public NestedRuntimeException(java.lang.String sMessage)
Constructor.
Parameters:
sMessage - a detail message for the exception

NestedRuntimeException

public NestedRuntimeException(java.lang.Exception e)
Constructor.
Parameters:
e - the underlying exception

NestedRuntimeException

public NestedRuntimeException(java.lang.Exception e,
                              java.lang.String sMessage)
Constructor.
Parameters:
e - the underlying exception
sMessage - a detail message for the exception

NestedRuntimeException

public NestedRuntimeException(java.lang.Throwable t)
Constructor.
Parameters:
t - the underlying throwable

NestedRuntimeException

public NestedRuntimeException(java.lang.Throwable t,
                              java.lang.String sMessage)
Constructor.
Parameters:
t - the underlying throwable
sMessage - a detail message for the exception
Method Detail

getNestedRuntimeException

public java.lang.Throwable getNestedRuntimeException()
Get the nested exception.
Returns:
the nested exception, or null if there isn't one

printStackTrace

public void printStackTrace()
Print stack trace of this exception and the underlying exception if available.
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter writer)
Print stack trace of this exception and the underlying exception if available.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
writer - the writer to print to

printStackTrace

public void printStackTrace(java.io.PrintStream printStream)
Print stack trace of this exception and the underlying exception if available.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
printStream - the print stream to print to

toString

public java.lang.String toString()
Create a string representation of the exception.
Overrides:
toString in class java.lang.Throwable

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.