public class WrapperException extends RuntimeException
CheckedWrapperException
Constructor and Description |
---|
WrapperException(String s)
Construct a WrapperException with a specified detail message.
|
WrapperException(Throwable e)
Construct a WrapperException from a Throwable object.
|
WrapperException(Throwable e,
String s)
Construct a WrapperException from a Throwable object and an additional
description.
|
Modifier and Type | Method and Description |
---|---|
static WrapperException |
ensure(Throwable e)
Ensure a WrapperException from a Throwable object.
|
static WrapperException |
ensure(Throwable e,
String s)
Ensure a WrapperException from a Throwable object and an additional
description.
|
String |
getLocalizedMessage()
Creates a localized description of this
WrapperException . |
String |
getMessage()
Returns the error message string of this WrapperException object.
|
Throwable |
getOriginalException() |
Throwable |
getRootCause()
Return the root cause of this exception.
|
String |
getWrapper() |
String |
toString()
Returns a short description of this WrapperException object.
|
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public WrapperException(Throwable e, String s)
e
- the Throwable objects
- the additional descriptionpublic WrapperException(Throwable e)
e
- the Throwable objectpublic WrapperException(String s)
s
- the String that contains a detailed messagepublic static WrapperException ensure(Throwable e, String s)
e
- the Throwable objects
- the additional descriptionWrapperException
with a specified
message and cause, unless the specified cause is already
an instance of a WrapperException
with the same message,
in which case the specified throwable is returnedpublic static WrapperException ensure(Throwable e)
e
- the Throwable objectWrapperException
with a specified
cause, unless the specified Throwable is already an instance of a
WrapperException
, in which case the specified throwable
is returnedpublic Throwable getOriginalException()
public Throwable getRootCause()
public String getWrapper()
public String getMessage()
getMessage
in class Throwable
WrapperException
public String getLocalizedMessage()
WrapperException
.
Subclasses may override this method in order to produce a
locale-specific message. For subclasses that do not override this
method, the default implementation returns the same result as
getMessage()
.getLocalizedMessage
in class Throwable
WrapperException
.