org.mortbay.util

Class MultiException

public class MultiException extends Exception

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

Version: $Id: MultiException.java,v 1.10 2004/05/09 20:32:49 gregwilkins Exp $

Author: Greg Wilkins (gregw)

Constructor Summary
MultiException()
Method Summary
voidadd(Exception e)
ExceptiongetException(int i)
ListgetExceptions()
voidifExceptionThrow()
Throw a multiexception.
voidifExceptionThrowMulti()
Throw a multiexception.
voidprintStackTrace()
voidprintStackTrace(PrintStream out)
voidprintStackTrace(PrintWriter out)
intsize()
StringtoString()

Constructor Detail

MultiException

public MultiException()

Method Detail

add

public void add(Exception e)

getException

public Exception getException(int i)

getExceptions

public List getExceptions()

ifExceptionThrow

public void ifExceptionThrow()
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: Exception

ifExceptionThrowMulti

public void ifExceptionThrowMulti()
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.

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(PrintStream out)

See Also: java.lang.Throwable#printStackTrace(java.io.PrintStream)

printStackTrace

public void printStackTrace(PrintWriter out)

See Also: java.lang.Throwable#printStackTrace(java.io.PrintWriter)

size

public int size()

toString

public String toString()
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.