Quantcast
Channel: Cartweaver Community Forums
Viewing all articles
Browse latest Browse all 25

How to Find & Report ColdFusion Error Details

$
0
0
If your CF server does not have Robust Exception Information enabled, you will only see limited details when your ColdFusion site throws an error.  A quick and easy way to get the full details of a CF error (for Cartweaver, or any CF site) is to use "cftry" and "cfcatch", along with "cfdump", to display the complete details of the problem in your browser.

For example:

<cftry>

... any code here ...

<cfcatch>
<cfdump var="#cfcatch#"><cfabort>
</cfcatch>
</cftry>

In the event of any CF error between the opening <cftry> and opening <cfcatch> tags, this will dump out the full error stack including line numbers, calling pages, complete SQL queries, and other important details, and stop all further processing. This can be wrapped around a full .cfm page, or a small block of code. For more about CFtry and CFcatch, see the ColdFusion Documentation.

Then, when you ask for help on the Cartweaver Forum, you will have the details handy. (With a query error, the full SQL is often the most important. With other errors, the .cfm template name and the line number can be key in tracking down the actual source of the issue.)

*Be sure to remove the debugging code once the error is fixed - if that same page or block of code throws another error, chances are you wouldn't want the site visitor to see the full output.


Michael Evangelista
Cartweaver ColdFusion Lead Developer
Twitter: http://twitter.com/m_evangelista
--
ColdFusion Reseller Hosting
http://www.GoWestHosting.com

Viewing all articles
Browse latest Browse all 25

Trending Articles