public abstract class AbstractRuntimeException extends RuntimeException
Exceptions
with a root cause.
Abstract because this exception should not be constructed directly, rather, a more detailed subclass should be constructed and thrown.
Constructor and Description |
---|
AbstractRuntimeException(String message)
Construct an
AbstractRuntimeException with the specified detail message. |
AbstractRuntimeException(String message,
Throwable cause)
Construct an
AbstractRuntimeException with the specified detail message and nested exception. |
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Returns the detail message, including the message from the nested exception if there is one.
|
Throwable |
getRootCause()
Retrieve the innermost cause of this exception, if any.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public AbstractRuntimeException(String message)
AbstractRuntimeException
with the specified detail message.message
- the detail message (which is saved for later retrieval by the getMessage()
method).public AbstractRuntimeException(String message, Throwable cause)
AbstractRuntimeException
with the specified detail message and nested exception.message
- the detail message (which is saved for later retrieval by the getMessage()
method).cause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null
value is permitted, and indicates that the cause is nonexistent or unknown.).public String getMessage()
getMessage
in class Throwable
Throwable
instance (which may be null
), including the message
from the nested exception if there is one.public Throwable getRootCause()
null
if none.<i>Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA</i>