View comments | RSS feed
Contents > CFML Reference > Reserved Words and Variables > ColdFusion tag-specific variables > CFCATCH variables PreviousNext

CFCATCH variables

Within a cfcatch block, the active exception properties can be accessed as the following variables:

CFCATCH.Type
CFCATCH.Message
CFCATCH.Detail
CFCATCH.ErrNumber
CFCATCH.NativeErrorCode
CFCATCH.SQLState
CFCATCH.LockName
CFCATCH.LockOperation
CFCATCH.MissingFileName
CFCATCH.TagContext
CFCATCH.ErrorCode
CFCATCH.ExtendedInfo

Contents > CFML Reference > Reserved Words and Variables > ColdFusion tag-specific variables > CFCATCH variables PreviousNext

ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


yoinky said on Jun 9, 2004 at 6:07 PM :
Through testing and the use of <cfdump var="#cfcatch#"> I have found that there are actually many more variables available.

Database Exceptions:

CFCATCH.QueryError - An error message similar to CFCATCH.Detail
CFCATCH.SQL -The actual SQL code that failed to run.
CFCATCH.Where - A string listing of cfqueryparam or cfsprocparam passed in.
CFCATCH.Datasource - Name of datasource the error occured in.

Undefined variable exceptions:

CFCATCH.Name - The name of the unknown variable or function.

Syntax/Parsing exception:

CFCATCH.TokenText - The actual peice of code from where the parsing failed.
CFCATCH.Snippet - Same as above but escaped for display.
CFCATCH.Column - The column the error occured on.
CFCATCH.KnownColumn - Presumably the last "good" line of code
CFCATCH.Line - The line the error occured on
CFCATCH.KnownLine - Presumably the end column of the last "good" line of code.

I would appreciate if macromedia could comment on this variables and if they could acknowledge if my definitions are correct.

It's also possible that other more obscure errors have more variables, so post them if you find them.

Jordan
yoinky said on Jun 9, 2004 at 6:14 PM :
Sorry let me correct 2 entries

CFCATCH.TokenText - The last "good" character before the error.
CFCATCH.Snippet - The "unit" of code trying to be executed, like the entire cftag source.

Jordan
rev_robert said on Mar 7, 2005 at 11:44 AM :
I have tried to use the cfcatch variables to output or mail information about an automated process and I the cfcatch blocks produce their own errors because not all the cfcatch variables are defined. If the variables are not going to be defined, it would be nice for the documentation to identify that so that code can anticipate when a variable will exist and when it won't.

Of course, it would be better for the variables to at least always be defined, but that is a complaint for a different venue.

Sincerely,
Robert
jrunrandy said on Mar 10, 2005 at 1:36 PM :
The ColdFusion MX 7 documentation has a more extensive list, most of which apply to CFMX 6.1.

http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000192.htm

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/expres15.htm