public abstract class ExceptionWithInnerException
extends java.lang.Exception
An exception's detail message chain contains the detail message of the exception concatenated with the detail message chain of the cause. If the exception does not have a cause, then the detail message chain is identical to the detail message.
| Constructor and Description |
|---|
ExceptionWithInnerException(java.lang.String message,
java.lang.Throwable cause)
Creates an
ExceptionWithInnerException with the specified
detail message and cause. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getMessageChain()
Returns the detail message chain associated with this exception.
|
static java.lang.String |
getMessageChain(java.lang.Exception e)
Returns the detail message chain associated with the exception.
|
public ExceptionWithInnerException(java.lang.String message,
java.lang.Throwable cause)
ExceptionWithInnerException with the specified
detail message and cause.
Note that the detail message associated with the cause is not automatically
incorporated in this exception's detail message; it is however included in
the detail message chain, which is accessible via getMessageChain().
message - the detail messagecause - the cause (OPTIONAL)public static java.lang.String getMessageChain(java.lang.Exception e)
The detail message chain contains the string representation of this exception, concatenated with the string representation of its cause(s).
e - an exceptionpublic java.lang.String getMessageChain()
The detail message chain contains the detail message of this exception concatenated with the detail message chain of the cause. If the exception does not have a cause, then the detail message chain is identical to the detail message.