com.ibm.pdq.runtime.exception
Class DataSQLException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.sql.SQLException
              extended by com.ibm.pdq.runtime.exception.DataSQLException
All Implemented Interfaces:
Serializable

public class DataSQLException
extends SQLException

DataSQLExceptions are intended for reporting internal exceptions in the pureQuery runtime code when an appropriate instance of Data (and therefore an appropriate instance of DataLogger) is not available.

DataSQLExceptions should be used in the pureQuery runtime code to wrap checked exceptions that are caught internally (such as IllegalAccessExceptions and IOExceptions). They also should be used for other internal exceptions, such as reporting illegal internal states. They should not be used to wrap SQLExceptions, however, since having code that catches SQLExceptions and wraps them in DataSQLExceptions could result in exceptions being repeatedly wrapped in DataSQLExceptions.

DataSQLExceptions should only be used at places in the pureQuery runtime code when a reference to an instance of Data (and therefore to an instance of Logger) is unavailable, since it is preferable to log exceptions to the Data-specific logger when possible. Since DataSQLException is a checked exception that is not allowed to be thrown to the user, they will be caught and wrapped in DataRuntimeExceptions before they are thrown to the user, and when this wrapping occurs, they will be logged to the Data-specific logger. Since the pureQuery tools code always uses the tools logger, the appropriate logger is always available, and therefore DataSQLExceptions should never be created in the pureQuery tools code.

See Also:
Serialized Form

Method Summary

Method Summary
Return Data TypeMethod Name and Description
int getExceptionLocation()

Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, setNextException

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

getExceptionLocation

public int getExceptionLocation()