org.enhydra.barracuda.core.util.exceptions
Class NestableException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.enhydra.barracuda.core.util.exceptions.NestableException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EventException, RenderException, ValidationException

public class NestableException
extends java.lang.Exception

This class simply defines a NestableException. A NestableException can contain other exceptions (which may have triggered this exception). The getRootException method provides a means to find the root exception in a NestableException chain.

See Also:
Serialized Form

Constructor Summary
NestableException()
          The noargs public contructor for NestableException
NestableException(java.lang.String s)
          The public contructor for NestableException
NestableException(java.lang.String s, java.lang.Exception ibaseException)
          The public contructor for NestableException
 
Method Summary
 java.lang.Exception getBaseException()
          get the BaseException behind this exception
static java.lang.Exception getRootException(NestableException ne)
          get the RootException behind this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestableException

public NestableException()
The noargs public contructor for NestableException


NestableException

public NestableException(java.lang.String s)
The public contructor for NestableException

Parameters:
s - a String describing the exception

NestableException

public NestableException(java.lang.String s,
                         java.lang.Exception ibaseException)
The public contructor for NestableException

Parameters:
s - a String describing the exception
Method Detail

getBaseException

public java.lang.Exception getBaseException()
get the BaseException behind this exception

Returns:
Exception baseException

getRootException

public static java.lang.Exception getRootException(NestableException ne)
get the RootException behind this exception. Will look for a baseException, and if it happens to be an instance of a NestableException, will recursively work deeper until it finds the exception which caused it all

Parameters:
ne - a NestableException for which we wish to find the root exception
Returns:
Exception the exception which caused it all


Copyright © 2001 Enhydra.org