Package com.tangosol.util
Class WrapperException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tangosol.util.WrapperException
- All Implemented Interfaces:
Serializable
A WrapperException wraps a Throwable object as a RuntimeException.
- Author:
- cp 2000.08.03
- See Also:
-
Constructor Summary
ConstructorDescriptionConstruct a WrapperException with a specified detail message.Construct a WrapperException from a Throwable object.WrapperException
(Throwable e, String s) Construct a WrapperException from a Throwable object and an additional description. -
Method Summary
Modifier and TypeMethodDescriptionstatic WrapperException
Ensure a WrapperException from a Throwable object.static WrapperException
Ensure a WrapperException from a Throwable object and an additional description.Creates a localized description of thisWrapperException
.Returns the error message string of this WrapperException object.Return the root cause of this exception.toString()
Returns a short description of this WrapperException object.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
WrapperException
Construct a WrapperException from a Throwable object and an additional description.- Parameters:
e
- the Throwable objects
- the additional description
-
WrapperException
Construct a WrapperException from a Throwable object.- Parameters:
e
- the Throwable object
-
WrapperException
Construct a WrapperException with a specified detail message.- Parameters:
s
- the String that contains a detailed message
-
-
Method Details
-
ensure
Ensure a WrapperException from a Throwable object and an additional description.- Parameters:
e
- the Throwable objects
- the additional description- Returns:
- a new instance of a
WrapperException
with a specified message and cause, unless the specified cause is already an instance of aWrapperException
with the same message, in which case the specified throwable is returned
-
ensure
Ensure a WrapperException from a Throwable object.- Parameters:
e
- the Throwable object- Returns:
- a new instance of a
WrapperException
with a specified cause, unless the specified Throwable is already an instance of aWrapperException
, in which case the specified throwable is returned
-
getOriginalException
- Returns:
- the original (wrapped) exception.
-
getRootCause
Return the root cause of this exception.- Returns:
- the root cause of exception.
-
getWrapper
- Returns:
- a String that shows the original exception was wrapped
-
getMessage
Returns the error message string of this WrapperException object.- Overrides:
getMessage
in classThrowable
- Returns:
- the error message string of this
WrapperException
-
getLocalizedMessage
Creates a localized description of thisWrapperException
. 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 asgetMessage()
.- Overrides:
getLocalizedMessage
in classThrowable
- Returns:
- The localized description of this
WrapperException
.
-
toString
Returns a short description of this WrapperException object.
-