Macromedia coldfusion 4.5-cfml language reference ユーザーズマニュアル
234
CFML Language Reference
failing database operations. If no SQLState value was provided, the value of
SQLSTATE is -1.
SQLSTATE is -1.
•
ErrNumber — TYPE=Expression only. Internal expression error number.
•
MissingFileName — TYPE=MissingInclude only. Name of the file that could not
be included.
be included.
•
LockName — TYPE=Lock only. The name of the affected lock (set to
anonymous if the lock was unnamed).
anonymous if the lock was unnamed).
•
LockOperation — TYPE=Lock only. The operation that failed (set to Timeout,
Create Mutex, or Unknown).
Create Mutex, or Unknown).
•
ErrorCode — TYPE=Custom type only. A string error code.
•
ExtendedInfo — TYPE=APPLICATION and custom only. A custom error
message.
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. "
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>
<HTML>
<HEAD>
<TITLE>
CFTRY Example
</TITLE>
</HEAD>
<TITLE>
CFTRY Example
</TITLE>
</HEAD>
<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY bgcolor="#FFFFD5">
<H3>CFTRY Example</H3>
<!--- open a CFTRY block --->
<CFTRY>
<CFTRY>
<!--- note that we have misspelled the tablename
"employees" as "employeeas" --->
<CFQUERY NAME="TestQuery" DATASOURCE="cfsnippets">
SELECT *
FROM EMPLOYEEAS
</CFQUERY>
"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 --->
<CFCATCH TYPE="Database">
<!--- the message to display --->
<H3>You’ve Thrown a Database <B>Error</B></H3>