![]() ![]() ![]() |
Within a CFCATCH block, the active exception's properties can be accessed as variables:
CFCATCH.TYPE -- The exception's type, returned as a string:
CFCATCH.MESSAGE -- The exception's diagnostic message, if one was provided. If no diagnostic message is available, this is an empty string.
CFCATCH.DETAIL -- A detailed message from the CFML interpreter. This message, which contains HTML formatting, can help to determine which tag threw the exception.
For database exceptions, ColdFusion supplies some additional diagnostic information. The following variables are available whenever the exception type is database:
CFCATCH.NATIVEERRORCODE -- 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.
CFCATCH.SQLSTATE -- 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.
For exceptions related to CFLOCK sections, there is additional information available within the CFCATCH block:
CFCATCH.LOCKNAME -- The name of the affected lock. This is set to "anonymous" if the lock name is not known.
CFCATCH.LOCKOPERATION -- The operation that failed. This is set to "unknown" if the failed operation is unknown.
For exceptions related to missing files, where the type of exception is MissingInclude, the following variable is available:
CFCATCH.MISSINGFILENAME -- The name of the file missing in an exception of type MissingInclude.
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.