public class MultiException
extends java.lang.Exception
| Modifier and Type | Field and Description |
|---|---|
private java.util.Collection<java.lang.Throwable> |
nestedExceptions
Collection of nested exceptions.
|
(package private) static long |
serialVersionUID
The serialVersionUID.
|
| Constructor and Description |
|---|
MultiException()
Constructs an Exception without a message.
|
MultiException(java.lang.String message)
Constructs an Exception with a detailed message.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addThrowable(java.lang.Throwable nested)
Add an exeception to this multiexception.
|
boolean |
isEmpty()
Tests to see if there are any nested exceptions within this
MultiException.
|
java.util.Iterator<java.lang.Throwable> |
listNestedExceptions()
Lists the nested exceptions that this Exception encapsulates.
|
void |
printStackTrace()
Beside printing out the standard stack trace this method prints out the
stack traces of all the nested exceptions using standard error.
|
void |
printStackTrace(java.io.PrintStream out)
Beside printing out the standard stack trace this method prints out the
stack traces of all the nested exceptions.
|
void |
printStackTrace(java.io.PrintWriter out)
Beside printing out the standard stack trace this method prints out the
stack traces of all the nested exceptions.
|
int |
size()
Gets the size of this nested exception which equals the number of
exception nested within.
|
static final long serialVersionUID
private java.util.Collection<java.lang.Throwable> nestedExceptions
public MultiException()
public MultiException(java.lang.String message)
message - The message associated with the exception.public java.util.Iterator<java.lang.Throwable> listNestedExceptions()
public int size()
public boolean isEmpty()
public void addThrowable(java.lang.Throwable nested)
nested - exception to add to this MultiException.public void printStackTrace(java.io.PrintWriter out)
printStackTrace in class java.lang.Throwableout - PrintWriter to write the nested stack trace to.public void printStackTrace(java.io.PrintStream out)
printStackTrace in class java.lang.Throwableout - PrintStream to write the nested stack trace to.public void printStackTrace()
printStackTrace in class java.lang.Throwable