First, a thanks to those who replied to my initial question about
CFERROR.... I thought it might be useful to share what I finally came up
with.... Using Scott Brady's initial suggestion for using two error
template references in the application.cfm file (exception and request).
The templates are as follows... these seem to work fine in testing and
may be pretty basic, but I learned a fair amount from the exercise
APPLICATION.CFM file:
<!--- code for sending error message to web developer/site admin---->
<cferror type="exception" template="error_admin.cfm" EXCEPTION="Any"
mailto="[EMAIL PROTECTED]">
<!--- code for person viewing web page--->
<cferror type="request" template="error_page.cfm"
mailto="[EMAIL PROTECTED]">
ERROR_ADMIN.cfm: (file to send message to web page developer/admin)
<cfmail from="[EMAIL PROTECTED]" subject="Web Site Error Report"
to="[EMAIL PROTECTED]" type="html">
Error Date/Time: #DateFormat(Now())# at #TimeFormat(Now(),"h:m tt")#<p>
Viewers Browser: #http_user_agent#<p>
Page error was generated: #error.template#<p>
URL Query string of Client's request: #error.QueryString#<p>
#error.diagnostics#
</cfmail>
ERROR_PAGE.CFM (excerpt of page that viewer sees)
We have logged the following information that will help us identify and
correct the problem:
<UL>
<LI>Error occurred at <B>#ERROR.Datetime#</B>
<LI>Your IP address is <B>#ERROR.RemoteAddress#</B>
<LI>Your browser is <B>#ERROR.Browser#</B>
<LI>You were trying to process
<B>#ERROR.Template#?#ERROR.QueryString#</B>
</UL>
If you can provide us with any additional information that would help
us fix this problem, please send E-Mail to: <A
HREF="mailto:#ERROR.MailTo#">#ERROR.MailTo#</A>.
Tim Laureska
-----Original Message-----
From: Chris Norloff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 8:26 AM
To: CF-Talk
Subject: RE: cferror
Here's my notes on cferror types (CF 4.5 SP2, Solaris, Oracle 8i):
Chris Norloff
type="expression"
- catches bad expression like "select * from m_job_summary where
job_id=#doesnt_exist#"
type="database"
- catches bad SQL like "select * from m_job_summary GROUP ORDER
BY"
- catches invalid column like "select * from m_job_summary where
doesnt_exist=10"
type="missinginclude"
- catches missing cfincluded files
- catches missing cfmodule files.
type="lock"
- catches problem with lock, such as timing out while waiting to
get exclusive access.
type="any"
Catches things not caught by a previous cfcatch statement.
Example:
- timeout error. Sometimes timeout error has type
COM.ALLAIRE.COLDFUSION.REQUEST.TIMEOUT. Sometimes type is UNKNOWN and
the message is Request timed out.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm