org.enhydra.barracuda.plankton.exceptions
Class NestableException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.enhydra.barracuda.plankton.exceptions.NestableException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
EventException, RenderException, ValidationException

public class NestableException
extends 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(String s)
          The public contructor for NestableException
NestableException(String s, Exception ibaseException)
          The public contructor for NestableException
 
Method Summary
 Exception getBaseException()
          get the BaseException behind this exception
static 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(String s)
The public contructor for NestableException

Parameters:
s - a String describing the exception

NestableException

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

Parameters:
s - a String describing the exception
ibaseException - the original exception to wrap within this exception
Method Detail

getBaseException

public Exception getBaseException()
get the BaseException behind this exception

Returns:
Exception baseException

getRootException

public static 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 © 2003 BarracudaMVC.org All Rights Reserved.