public abstract class ChainedException extends java.lang.Exception implements java.lang.Iterable<ChainedException>
iterator() or the getNextException() to browse
all chained exceptions and dispatch them.
See ChainedException.ChainedExceptionBuilder to build the chain of exceptions.| Modifier and Type | Class and Description |
|---|---|
static class |
ChainedException.ChainedExceptionBuilder<T extends ChainedException>
Builder to construct a chain of exceptions.
|
| Constructor and Description |
|---|
ChainedException(java.lang.String message)
Construct the exception with a
String message. |
ChainedException(java.lang.String message,
java.lang.Throwable cause)
Construct the exception with a
String message and a Throwable cause. |
ChainedException(java.lang.Throwable cause)
Construct the exception with a
Throwable cause. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLocalizedMessage() |
java.lang.String |
getMessage() |
ChainedException |
getNextException()
Get the next exception chained to this exception.
|
int |
getNextExceptionCount() |
java.util.Iterator<ChainedException> |
iterator() |
protected ChainedException |
putAsLastExceptionOf(ChainedException head) |
void |
setMessage(java.lang.String message)
Set the
String message. |
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic ChainedException(@Nonnull
java.lang.String message)
String message.message - the messagepublic ChainedException(@Nonnull
java.lang.String message,
@Nonnull
java.lang.Throwable cause)
String message and a Throwable cause.message - the messagecause - the causepublic ChainedException(@Nonnull
java.lang.Throwable cause)
Throwable cause.cause - the cause@Nonnull public java.lang.String getMessage()
getMessage in class java.lang.Throwable@Nonnull public java.lang.String getLocalizedMessage()
getLocalizedMessage in class java.lang.Throwablepublic void setMessage(@Nonnull
java.lang.String message)
String message.message - the message@Nonnull protected ChainedException putAsLastExceptionOf(@CheckForNull ChainedException head)
@CheckForNull public ChainedException getNextException()
@Nonnegative public int getNextExceptionCount()
@Nonnull public java.util.Iterator<ChainedException> iterator()
iterator in interface java.lang.Iterable<ChainedException>