public abstract class NestedExceptionUtils
extends java.lang.Object
Mainly for use within the framework.
NestedRuntimeException,
NestedCheckedException,
NestedIOException,
org.springframework.web.util.NestedServletException| Constructor and Description |
|---|
NestedExceptionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildMessage(java.lang.String message,
java.lang.Throwable cause)
Build a message for the given base message and root cause.
|
static java.lang.Throwable |
getMostSpecificCause(java.lang.Throwable original)
Retrieve the most specific cause of the given exception, that is,
either the innermost cause (root cause) or the exception itself.
|
static java.lang.Throwable |
getRootCause(java.lang.Throwable original)
Retrieve the innermost cause of the given exception, if any.
|
public static java.lang.String buildMessage(java.lang.String message,
java.lang.Throwable cause)
message - the base messagecause - the root causepublic static java.lang.Throwable getRootCause(java.lang.Throwable original)
original - the original exception to introspectnull if nonepublic static java.lang.Throwable getMostSpecificCause(java.lang.Throwable original)
Differs from getRootCause(java.lang.Throwable) in that it falls back
to the original exception if there is no root cause.
original - the original exception to introspectnull)