org.mortbay.util
Class MultiException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.mortbay.util.MultiException
All Implemented Interfaces:
java.io.Serializable

public class MultiException
extends java.lang.Exception

Wraps multiple exceptions. Allows multiple exceptions to be thrown as a single exception.

Version:
$Id: MultiException.java,v 1.8.2.1 2003/09/15 06:14:12 gregwilkins Exp $
Author:
Greg Wilkins (gregw)
See Also:
Serialized Form

Constructor Summary
MultiException()
           
 
Method Summary
 void add(java.lang.Exception e)
           
 java.lang.Exception getException(int i)
           
 java.util.List getExceptions()
           
 void ifExceptionThrow()
          Throw a multiexception.
 void ifExceptionThrowMulti()
          Throw a multiexception.
 void printStackTrace()
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiException

public MultiException()
Method Detail

add

public void add(java.lang.Exception e)

size

public int size()

getExceptions

public java.util.List getExceptions()

getException

public java.lang.Exception getException(int i)

ifExceptionThrow

public void ifExceptionThrow()
                      throws java.lang.Exception
Throw a multiexception. If this multi exception is empty then no action is taken. If it contains a single exception that is thrown, otherwise the this multi exception is thrown.

Throws:
java.lang.Exception

ifExceptionThrowMulti

public void ifExceptionThrowMulti()
                           throws MultiException
Throw a multiexception. If this multi exception is empty then no action is taken. If it contains a any exceptions then this multi exception is thrown.

MultiException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.