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

void
add(Exception e)
Exception
getException(int i)
List
getExceptions()
void
ifExceptionThrow()
Throw a multiexception.
void
ifExceptionThrowMulti()
Throw a multiexception.
void
printStackTrace()
void
printStackTrace(PrintStream out)
void
printStackTrace(PrintWriter out)
int
size()
String
toString()

Constructor Details

MultiException

public MultiException()

Method Details

add

public void add(Exception e)

getException

public Exception getException(int i)

getExceptions

public List getExceptions()

ifExceptionThrow

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

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.

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.