Macromedia coldfusion 4.5-cfml language reference User Manual

Page of 608
234
CFML Language Reference 
failing database operations. If no SQLState value was provided, the value of 
SQLSTATE is -1. 
ErrNumber — TYPE=Expression only. Internal expression error number.
MissingFileName — TYPE=MissingInclude only. Name of the file that could not 
be included.
LockName — TYPE=Lock only. The name of the affected lock (set to 
anonymous if the lock was unnamed).
LockOperation — TYPE=Lock only. The operation that failed (set to Timeout, 
Create Mutex, or Unknown).
ErrorCode — TYPE=Custom type only. A string error code.
ExtendedInfo — TYPE=APPLICATION and custom only. A custom error 
message.
Note
In order to see the tag stack displayed by TagContext, use the ColdFusion 
Administrator to enable the CFML stack trace.Under Debugging in the 
ColdFusion Administrator, choose the checkbox next to "Enable CFML 
stack trace. "
Example
<!--- CFTRY example, using TagContext to display the tag stack. --->
<HTML>
<HEAD>
<TITLE>
CFTRY Example
</TITLE>
</HEAD>
<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">
<H3>CFTRY Example</H3>
<!--- open a CFTRY block --->
<CFTRY>
<!--- note that we have misspelled the tablename
"employees" as "employeeas" --->
<CFQUERY NAME="TestQuery" DATASOURCE="cfsnippets">
SELECT *
FROM EMPLOYEEAS
</CFQUERY>
<P>... other processing goes here
<!--- specify the type of error for which we are fishing --->
<CFCATCH TYPE="Database">
<!--- the message to display --->
<H3>You’ve Thrown a Database <B>Error</B></H3>