Knowledgebase: How To
How to show ColdFusion robust exceptions
Posted by Joe Rebis (Import) on 22 September 2006 11:59 PM

For security reasons we do not enable ColdFusion robust exception messages. Robust exception messages can be helpful when developing applications because of the detail that ColdFusion provides (much more than most languages). However, this information can reveal too much information as well.

To be able to see the robust debugging information, you should use the CFERROR tag in your application. We have included an example below, but there is more to this tag than this. Check your ColdFusion documentation. We would also suggest that you use CFTRY, CFCATCH and CFTHROW.

Insert the following two lines at the top of page you want to debug or preferably in your application.cfm page:

<cferror type="exception" template="error.cfm">

<cferror type="request" template="error.cfm">

Create an error.cfm page and FTP it into into the same directory as your application.cfm page:

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>ColdFusion Error</title>

</head>

<body>

<h2>ColdFusion Error</h2>

<cfoutput>

<ul>

<li><b>Your Location:</b> #error.remoteAddress#

<li><b>Your Browser:</b> #error.browser#

<li><b>Date and Time the Error Occurred:</b> #error.dateTime#

<li><b>Referrer:</b></li>

<p>#error.HTTPReferer#</p>

<li><b>Template:</b></li>

<p>#error.template#</p>

<li><b>Message Content:</b>:

<p>#error.diagnostics#</p>

<li><b>Query String:</b></li>

<p>#error.querystring#</p>

<li><b>Generated Content:</b></li>

<p>

#error.generatedcontent#

</p>

</ul>

</cfoutput>

</body>

</html>

(1088 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Copyright © 2015 EPhost, Inc. All rights reserved.