public abstract class WrappedRuntimeException extends RuntimeException
Constructor and Description |
---|
WrappedRuntimeException(String message)
Construct a WrappedRuntimeException with the specified
message.
|
WrappedRuntimeException(String message,
Throwable cause)
Construct a WrappedRuntimeException with the specified
message and wrapped exception.
|
Modifier and Type | Method and Description |
---|---|
protected String |
constructMessage(String message,
Throwable cause)
Constructs an exception String with the given message and incorporating the
causing exception
|
<E extends Exception> |
findWrapped(Class<E> exceptionType)
Returns the next parent exception of the given type, or null
|
String |
getMessage()
Return the detail message, including the message from the wrapped
exception if there is one.
|
Throwable |
getRootCause()
Retrieves the ultimate root cause for this exception, or null
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public WrappedRuntimeException(String message)
message
- the specific messagepublic WrappedRuntimeException(String message, Throwable cause)
message
- the specific messagecause
- the wrapped exceptionpublic String getMessage()
getMessage
in class Throwable
protected String constructMessage(String message, Throwable cause)
message
- The messagecause
- The causing exceptionpublic Throwable getRootCause()
public <E extends Exception> E findWrapped(Class<E> exceptionType)
E
- The exception typeexceptionType
- the exception type to matchCopyright © 2010–2018 Jadira Systems. All rights reserved.