public class MultiException extends Exception
Constructor and Description |
---|
MultiException()
Constructs an Exception without a message.
|
MultiException(String message)
Constructs an Exception with a detailed message.
|
Modifier and Type | Method and Description |
---|---|
void |
addThrowable(Throwable nested)
Add an exception to this multiexception.
|
boolean |
isEmpty()
Tests to see if there are any nested exceptions within this
MultiException.
|
Iterator<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(PrintStream out)
Beside printing out the standard stack trace this method prints out the
stack traces of all the nested exceptions.
|
void |
printStackTrace(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.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public MultiException()
public MultiException(String message)
message
- The message associated with the exception.public Iterator<Throwable> listNestedExceptions()
public int size()
public boolean isEmpty()
public void addThrowable(Throwable nested)
nested
- exception to add to this MultiException.public void printStackTrace(PrintWriter out)
printStackTrace
in class Throwable
out
- PrintWriter to write the nested stack trace to.public void printStackTrace(PrintStream out)
printStackTrace
in class Throwable
out
- PrintStream to write the nested stack trace to.public void printStackTrace()
printStackTrace
in class Throwable
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.