com.ibm.pdq.runtime.exception
Class DataRuntimeException
- java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ibm.pdq.runtime.exception.DataRuntimeException
All implemented interfaces:
Direct known subclasses:
public class DataRuntimeException extends RuntimeExceptionIndicates the occurrence of an exception in a pureQuery method.
See Also:
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addLastException(DataRuntimeException newException)
Adds the
DataRuntimeException newException as the last Exception in a linked list of
DataRuntimeException s.
|
getErrorCode()
Returns the error code for this
DataRuntimeException .
|
|
getErrorType()
Returns an
ErrorType object that indicates the error type of this
DataRuntimeException .
|
|
|
getExceptionLocation()
Returns the
int that indicates where in the code the exception occurred.
|
getMessage()
Returns the message that is associated with the exception.
|
|
getNextException()
Returns the
DataRuntimeException nextException that is the next Exception in a linked
list of DataRuntimeException s.
|
|
getProductVersion()
Returns a
String that indicates the version of the pureQuery code in which the exception occurred.
|
|
getSQLState()
Returns the SQLState for this
DataRuntimeException .
|
|
|
isTransient()
Returns a
boolean value that indicates whether the action that resulted in this exception has a
chance to succeed if attempted again.
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail
addLastException
public void addLastException(DataRuntimeException newException)
Parameters:
newException
- a DataRuntimeException
instance to be added as the last Exception
in the linked list of DataRuntimeException
s See Also:
getErrorCode
public Integer getErrorCode()
Returns the error code for this
DataRuntimeException
. If the DataRuntimeException
exception has an SQLException
object as its cause ( getCause()
), this method
returns the error code of the cause exception ( cause.getErrorCode()
).
In other cases, this method might return an error code that is generated by pureQuery. If no error code is
available, this method returns -99999
.
Returns:
the error code of this exception.
getErrorType
public ErrorType getErrorType()
Returns an
ErrorType
object that indicates the error type of this
DataRuntimeException
. If the DataRuntimeException
has an
SQLException
object as its cause ( getCause()
), the error type is derived
from the SQLState and error code of the cause. If the cause is not an SQLException
, this method
returns ErrorType.UNCATEGORIZED_ERROR
.
Returns:
the error type of the exception.
getExceptionLocation
public int getExceptionLocation( )
Returns the
int
that indicates where in the code the exception occurred.
Returns:
the
int
that indicates where in the code the exception occurred getMessage
public String getMessage()
Returns the message that is associated with the exception.
Overrides:
getMessage
in class Throwable
getNextException
public DataRuntimeException getNextException( )
Returns the
DataRuntimeException nextException
that is the next Exception
in a linked
list of DataRuntimeException
s. The DataRuntimeException
instance on which the
getNextException
method is called is also a member of that linked list. This linked list can be used
to record a sequence of DataRuntimeException
s that occur. A DataRuntimeException
can
be added to the end of the linked list by calling addLastException(DataRuntimeException)
.
Returns:
the
DataRuntimeException
instance that is the next Exception
in the linked
list of DataRuntimeException
s See Also:
getProductVersion
public String getProductVersion( )
Returns a
String
that indicates the version of the pureQuery code in which the exception occurred.
Returns:
a
String
that indicates the version of the pureQuery code in which the exception occurred getSQLState
public String getSQLState()
Returns the SQLState for this
DataRuntimeException
. If the DataRuntimeException
exception has an SQLException
object as its cause ( getCause()
), this method
returns the SQLState of the cause exception ( cause.getSQLState()
, or
null
if its SQLState is null
). If there is no cause exception, or if the cause is
not an SQLException
, this method returns "FFFFF"
.
Returns:
the SQLState of this exception.
isTransient
public boolean isTransient()
Returns a
boolean
value that indicates whether the action that resulted in this exception has a
chance to succeed if attempted again. The value true
indicates that an operation that previously
failed might be able to succeed if the operation is retried without any intervention by application-level
functionality.
Returns:
a
boolean
that indicates whether the action that resulted in this exception has a chance to
succeed if attempted again.
DataRuntimeException newException
as the lastException
in a linked list ofDataRuntimeException
s. TheDataRuntimeException
instance on which theaddLastException
method is called is also a member of that linked list. This linked list can be used to record a sequence ofDataRuntimeException
s that occur. The nextException
in the linked list can be obtained by usinggetNextException()
.