Chapter 8: Debugging and Error Handling
Database exceptions
For database exceptions, ColdFusion supplies some additional diagnostic information.
The following variables are available whenever the exception type is database:
Property variable
CFCATCH.NATIVEERRORCODE
CFCATCH.SQLSTATE
Expression exceptions
Property variable
CFCATCH.ERRNUMBER
Locking exceptions
For exceptions related to CFLOCK sections, there is additional information available
within the CFCATCH block:
Property variable
CFCATCH.LOCKNAME
CFCATCH.LOCKOPERATION
Description
The native error code associated with this
exception. Database drivers typically provide
error codes to assist in the diagnosis of failing
database operations. The values assumed by
CFCATCH.NATIVEERRORCODE are driver-
dependent. If no error code is provided, the
value of NativeErrorCode is -1.
The SQLSTATE code associated with this
exception. Database drivers typically provide
error codes to assist in the diagnosis of failing
database operations. The values assumed by
CFCATCH.SQLSTATE are driver-dependent. If no
SQLSTATE value was provided, the value of
SQLSTATE is -1.
Description
An internal expression error number, valid
only when
TYPE="Expression"
Description
The name of the affected lock. This is set to
"anonymous" if the lock name is not known.
The operation that failed. This is set to
"unknown" if the failed operation is unknown.
99
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?