Exceptions with a root cause.
This class is abstract to force the programmer to extend the class.
The similarity between this class and the NestedRuntimeException
class is unavoidable, as Java forces these two classes to have different
superclasses (ah, the inflexibility of concrete inheritance!).
getMessage, NestedRuntimeException
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Use serialVersionUID from Spring 1.2 for interoperability.
|
| Access | Constructor and Description |
|---|---|
| public | NestedCheckedException(String
the detail message msg)Construct a |
| public | NestedCheckedException(String
the detail message msg, Throwable the nested exception cause)Construct a |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public Throwable | Returns: the most specific cause (nevernull)Retrieve the most specific cause of this exception, that is, either the innermost cause (root cause) or this exception itself. |
| public Throwable | Returns: the innermost exception, ornull if noneRetrieve the innermost cause of this exception, if any. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. Use serialVersionUID from Spring 1.2 for interoperability. | |
| NestedCheckedException | back to summary |
|---|---|
| public NestedCheckedException(String msg) Construct a
| |
| NestedCheckedException | back to summary |
|---|---|
| public NestedCheckedException(String msg, Throwable cause) Construct a | |
| contains | back to summary |
|---|---|
| public boolean contains(Class<?> exType) Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type.
| |
| getMostSpecificCause | back to summary |
|---|---|
| public Throwable getMostSpecificCause() Retrieve the most specific cause of this exception, that is, either the innermost cause (root cause) or this exception itself. Differs from
| |
| getRootCause | back to summary |
|---|---|
| public Throwable getRootCause() Retrieve the innermost cause of this exception, if any. | |