public class MultiException extends RuntimeException
Constructor and Description |
---|
MultiException()
Creates an empty MultiException.
|
MultiException(List<Throwable> ths)
This list must have at least one element in it.
|
MultiException(Throwable th)
This allows for construction of a MultiException
with one element in its list.
|
MultiException(Throwable th,
boolean reportToErrorService)
This allows for construction of a MultiException
with one element in its list.
|
Modifier and Type | Method and Description |
---|---|
void |
addError(Throwable error)
Adds an error to an existing exception.
|
List<Throwable> |
getErrors()
Gets all the errors associated with this MultiException.
|
String |
getMessage()
Gets the message associated with this exception.
|
boolean |
getReportToErrorService()
Returns true if this exception should be reported
to the error service when thrown during a creation
or deletion of a service.
|
void |
printStackTrace(PrintStream s)
Prints the stack trace of this exception to the given PrintStream.
|
void |
printStackTrace(PrintWriter s)
Prints the stack trace of this exception to the given PrintWriter.
|
void |
setReportToErrorService(boolean report)
Sets if this exception should be reported
to the error service when thrown during a creation
or deletion of a service.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace
public MultiException()
public MultiException(List<Throwable> ths)
ths
- A non-null, non-empty list of exceptions.public MultiException(Throwable th, boolean reportToErrorService)
th
- May not be null.public MultiException(Throwable th)
th
- May not be null.public List<Throwable> getErrors()
public void addError(Throwable error)
error
- The exception to add.public String getMessage()
getMessage
in class Throwable
public void printStackTrace(PrintStream s)
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter s)
printStackTrace
in class Throwable
public boolean getReportToErrorService()
public void setReportToErrorService(boolean report)
report
- true if this exception should be reported to
the error service when creating or deleting a service.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.