com.ibm.pdq.runtime.exception
Class DataSQLException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
com.ibm.pdq.runtime.exception.DataSQLException
- All Implemented Interfaces:
- Serializable
-
public class DataSQLException
- extends SQLException
DataSQLException
s 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.
DataSQLException
s should be used in the pureQuery runtime code to wrap checked exceptions that are caught internally (such as IllegalAccessException
s and
IOException
s). They also should be used for other internal exceptions, such as reporting illegal internal states. They should not be used to wrap SQLException
s, however,
since having code that catches SQLException
s and wraps them in DataSQLException
s could result in exceptions being repeatedly wrapped in
DataSQLException
s.
DataSQLException
s 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 DataRuntimeException
s 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
DataSQLException
s should never be created in the pureQuery tools code.
- See Also:
- Serialized Form
Method Summary
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
getExceptionLocation
public int getExceptionLocation()