Compoze Software, Inc.

com.compoze.util
Class NestedException


java.lang.Object

  |

  +--java.lang.Throwable

        |

        +--java.lang.Exception

              |

              +--com.compoze.util.NestedException

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DominoException, ExchangeException

public abstract class NestedException
extends java.lang.Exception
implements java.io.Serializable

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

See Also:
NestedRuntimeException, Serialized Form

Constructor Summary
NestedException()
          Constructor.
NestedException(java.lang.Exception e)
          Constructor.
NestedException(java.lang.Exception e, java.lang.String sMessage)
          Constructor.
NestedException(java.lang.String sMessage)
          Constructor.
NestedException(java.lang.Throwable t)
          Constructor.
NestedException(java.lang.Throwable t, java.lang.String sMessage)
          Constructor.
 
Method Summary
 java.lang.Throwable getNestedException()
          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

NestedException


public NestedException()
Constructor.

NestedException


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

NestedException


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

NestedException


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

NestedException


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

NestedException


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

getNestedException


public java.lang.Throwable getNestedException()
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.