com.ibm.pdq.runtime.exception

Class DataRuntimeException

  1. java.lang.Object
  2. extended byjava.lang.Throwable
  3. extended byjava.lang.Exception
  4. extended byjava.lang.RuntimeException
  5. extended bycom.ibm.pdq.runtime.exception.DataRuntimeException
All implemented interfaces:
Serializable
Direct known subclasses:
GenerationException, UpdateManyException

public class DataRuntimeException
extends RuntimeException
Indicates the occurrence of an exception in a pureQuery method.
See Also:
Serialized Form

Method Summary

Modifier and Type Method and Description
  1. void
addLastException(DataRuntimeException newException)
Adds the DataRuntimeException newException as the last Exception in a linked list of DataRuntimeExceptions.
  1. Integer
getErrorCode()
Returns the error code for this DataRuntimeException.
  1. ErrorType
getErrorType()
Returns an ErrorTypeobject that indicates the error type of this DataRuntimeException.
  1. int
getExceptionLocation()
Returns the int that indicates where in the code the exception occurred.
  1. String
getMessage()
Returns the message that is associated with the exception.
  1. DataRuntimeException
getNextException()
Returns the DataRuntimeException nextException that is the next Exception in a linked list of DataRuntimeExceptions.
  1. String
getProductVersion()
Returns a String that indicates the version of the pureQuery code in which the exception occurred.
  1. String
getSQLState()
Returns the SQLState for this DataRuntimeException.
  1. boolean
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)
Adds the DataRuntimeException newException as the last Exception in a linked list of DataRuntimeExceptions. The DataRuntimeException instance on which the addLastException method is called is also a member of that linked list. This linked list can be used to record a sequence of DataRuntimeExceptions that occur. The next Exception in the linked list can be obtained by using getNextException().
Parameters:
newException - a DataRuntimeException instance to be added as the last Exception in the linked list of DataRuntimeExceptions
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:

getNextException

public DataRuntimeException getNextException(
)
Returns the DataRuntimeException nextException that is the next Exception in a linked list of DataRuntimeExceptions. 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 DataRuntimeExceptions 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 DataRuntimeExceptions
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.