public abstract class StpException extends WvcmException
javax.wvcm.WvcmException
used throughout this API. Although API methods are declared to throw
WvcmException, the exception actually thrown is StpException or one of its
subclasses.
This class extends the WvcmException class, adding a sub-reason code
field that encodes conditions specific to this API more finely than the
WvcmException.ReasonCode
This class (unlike the WvcmException class) leverages the Java 1.4 chained
exception mechanism. By default, if an StpException is constructed from one
or more nested Throwables, the first nested Throwable in the list is also set
as the StpException's cause
. In
certain special cases, the cause may be set to something other than the first
nested Throwable.
Exception classes that extend StpException because they convey additional
information, are as follows:
StpPropertyException
- adds name of property responsible for the
exception
StpPartialResultsException
- holds a ResourceList of child
resources successfully received, a nested list of Exceptions for child
resources that could not be retrieved, and an indicator of whether the two
lists completely identify all resources that were supposed to be retrieved.
Modifier and Type | Class and Description |
---|---|
static interface |
StpException.Data
The specification for the data implementation object associated with this
exception.
|
static class |
StpException.StpReasonCode
An encoding of exception conditions specific to this API.
|
WvcmException.ReasonCode
Modifier and Type | Method and Description |
---|---|
abstract StpException.Data |
data() |
String |
getMessage()
Localizes the message contained within this exception and returns it.
|
StpException.StpReasonCode |
getStpReasonCode() |
String |
toString() |
static <U> U |
unchecked_cast(Object obj)
Casts an Object to a Type, avoiding a type safety warning.
|
getNestedExceptions, getReasonCode, getResource
public abstract StpException.Data data()
public String getMessage()
getMessage
in class Throwable
public StpException.StpReasonCode getStpReasonCode()
public String toString()
toString
in class Throwable
public static <U> U unchecked_cast(Object obj)
StpException.<desired-type>unchecked_cast(x)The ugliness of this construct matches the sledge hammer that is being used to make the code compile without warnings.
U
- The Type to which the object should be castobj
- The Object to be castCopyright © IBM 2018. All rights reserved.