public final class CompositeException
extends java.lang.RuntimeException
| Constructor and Description |
|---|
CompositeException() |
CompositeException(java.lang.Iterable<? extends java.lang.Throwable> exceptions) |
CompositeException(java.lang.String message) |
CompositeException(java.lang.Throwable... exceptions) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.Throwable> |
getExceptions()
Returns a copy of all exceptions in this composite, including any cause and
suppressed exceptions.
|
boolean |
isEmpty()
Returns true if this CompositeException doesn't have a cause or
any suppressed exceptions.
|
void |
printStackTrace(java.io.PrintStream s) |
void |
printStackTrace(java.io.PrintWriter s) |
int |
size() |
void |
suppress(java.lang.Throwable e)
Adds a suppressed exception to this composite.
|
public CompositeException()
public CompositeException(java.lang.String message)
public CompositeException(java.lang.Iterable<? extends java.lang.Throwable> exceptions)
public CompositeException(java.lang.Throwable... exceptions)
public void suppress(java.lang.Throwable e)
The method is named this way to avoid conflicts with Java 7 environments and its addSuppressed() method.
e - the exception to suppress, nulls are converted to NullPointerExceptionspublic java.util.List<java.lang.Throwable> getExceptions()
public boolean isEmpty()
public void printStackTrace(java.io.PrintStream s)
printStackTrace in class java.lang.Throwablepublic void printStackTrace(java.io.PrintWriter s)
printStackTrace in class java.lang.Throwablepublic int size()