public class ErrorCollectionException
extends java.lang.Exception
ErrorCollectionException
exception is thrown when multiple errors
(that are related in some way) occur. This exception typically contains some number
of more specific, individual exceptions that provide more information about the underlying errors.
For example, the ErrorCollectionException
exception may be thrown when an attempt is
made to validate an invalid security realm, or when performing security data migration tasks.
In each case, the exceptions within the ErrorCollectionException
exception provide the
details about what went wrong.
Modifier and Type | Field and Description |
---|---|
private java.util.List |
exceptionList |
static long |
serialVersionUID |
Constructor and Description |
---|
ErrorCollectionException()
Constructs an
ErrorCollectionException with no embedded exceptions. |
ErrorCollectionException(java.lang.String baseMessage)
Constructs an
ErrorCollectionException with the specified base message. |
ErrorCollectionException(java.lang.Throwable exception)
Constructs an
ErrorCollectionException that specifies a single embedded exception. |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Throwable exception)
Adds an exception to this collection of exceptions.
|
java.lang.String |
getBaseMessage()
Gets the base message for this exception.
|
java.util.Collection |
getExceptions()
Gets the exceptions that are embedded in this collection of exceptions.
|
java.lang.String |
getMessage()
Gets detail messages for all exceptions that have been added to this collection of exceptions.
|
boolean |
isEmpty()
Tests if any exceptions have been added to this collection of exceptions.
|
public static final long serialVersionUID
private java.util.List exceptionList
public ErrorCollectionException()
ErrorCollectionException
with no embedded exceptions.public ErrorCollectionException(java.lang.String baseMessage)
ErrorCollectionException
with the specified base message.
A base message is a String that describes this collection of exceptions.baseMessage
- a String providing additional information about this collection of exceptions.public ErrorCollectionException(java.lang.Throwable exception)
ErrorCollectionException
that specifies a single embedded exception.exception
- the exception to be held by this collection of exceptions.public java.util.Collection getExceptions()
Collection
embedded in this
collection of exceptions.public boolean isEmpty()
public java.lang.String getBaseMessage()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public void add(java.lang.Throwable exception)
exception
- the exception to be added to this collection of exceptions.