Even though you've implemented CFERROR to catch EXCEPTIONS, you should still
have another CFERROR with REQUEST in case your EXCEPTION handling page ever
generates an error.  If it does, it will be caught by the REQUEST CFERROR.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -----Original Message-----
> From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 11:42 AM
> To: CF-Talk
> Subject: RE: cferror
>
>
> Hi, Tim.
>
> I implemented your approach below and it works well,
> except that when the request type error occurs,
> I do get the email sent to the admin, but the only thing
> that shows up in the browser is a blank screen.
>
> If I add your error_page.cfm code to the error_admin.cfm page
> then the admin email is sent, then the error message to the user
> is displayed.
>
> Why do we need two pages?  (I assume that exception error code,
> being set to "any" will catch every type of error that occurs and
> therefore,
> the error_admin.cfm page will always be executed?)
>
> Thanks,
>
> Rick
>
>
> -----Original Message-----
> From: Tim Laureska [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 18, 2002 8:54 AM
> To: CF-Talk
> Subject: RE: cferror
>
>
> 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

Reply via email to