On 10/21/2003 at 10:57, you wrote:
MD> You can add a site wide error handler to catch all the errors and email you
MD> all the info. I use a CFMAIL tag (HTML mail) that contains a CFDUMP of the
MD> following data structures:
MD> Error
MD> CGI
MD> Url
MD> Form
MD> Session
MD> Application
MD> This gives me a huge dump of useful information that I can then use to hunt
MD> down and kill the error.
I second that recommendation!
Scott, I recently did a similar error handling upgrade to a server
full of applications. I created a "Site-wide Error Handler"
(configured in CF Admin) that contained error and cgi scope dumps.
I avoided session and application dumps as not all the applications on
the box have Application.cfm modules that declare and application with
session management. Cold Fusion would throw an error if I even tried
to check for the existence of these scopes [e.g.,
isdefined("session")]. But I've found that the error and cgi scopes
give more than enough information to resolve most problems.
If installing a Site-wide Error Handler is not an option, then the
same code can be leveraged by using the CFERROR tag in your site's
Application.cfm module(s):
<cferror type="exception" template="error_exception.cfm" mailto="[EMAIL PROTECTED]">
error_exception.cfm:
<cfmail to="#error.mailto#" from="#error.mailto#" subject="#cgi.server_name# error [#error.datetime#]">
--cgi--
<cfloop collection="#cgi#" item="j">
*#j#* #cgi[j]#
</cfloop>
etc...
</cfmail>
I choose to use plain text in my error emails, thus the CFLOOPs
instead of the CFDUMPs.
~ Ubqtous ~
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

