Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Stormpool #1
CFError and Email Report
I want an email to be triggered with details of any errors a customer has
whilst on our website. Running CFMX 7.
I have read that CFML will only work on the error page if it's a Monitor or
Exception error.
If I put type="monitor" then i get:
Attribute validation error for tag CFERROR.
The value of the attribute type, which is currently "monitor", is invalid.
If I use exception, it doesn't not pick up the errors i'm expecting to get....
Request: Picks up the errors and displays my customer error page, but does not
trigger the email because it doesn't allow full CFML processing, and instead
displays the email content on the webpage.
The errors i'm expecting to pick up are CFHTTP timeouts, and possibly missing
variables.. (if someone deletes from URL)
So,
Does anyone know why Type="Monitor" doesn't work?
And how I can get it to trigger an email when my only option appears
Type="Request" ?
Thanks, Dan
Stormpool Guest
-
cferror and Server Name
Hello All, We have an exception handler page that will email us the page the user was on and the page the user was trying to get to. My question... -
cferror question??
Hi all... I am using cferror to catch errors in our site and am able to catch every type of error except for a "database" error. Here is what our... -
CFERROR
Hi. I am just testing a simple site to try cf. The header is in application.cfm and the fotter in OnRequestEnd.cfm The main page is the requested... -
ASP/CDO verify email address from Exchange 2000 non-delivery report
Apologies for the cross-post but i thought i'd aim for the largest audience possible. I have a web site that users have to register to with their... -
How to link 3 different combo boxex in a form (as report criteria) to the report
I would like to use 3 combo boxes in a form as parameter criteria for a report. When I open a report, there will be a pop up form with 3 combo... -
Neculai Macarie #2
Re: CFError and Email Report
> I want an email to be triggered with details of any errors a customer has
or> whilst on our website. Running CFMX 7.
>
> I have read that CFML will only work on the error page if it's a Monitorinvalid.> Exception error.
>
> If I put type="monitor" then i get:
>
> Attribute validation error for tag CFERROR.
> The value of the attribute type, which is currently "monitor", is
Monitor error type is deprecated since CFMX 6.
get....> If I use exception, it doesn't not pick up the errors i'm expecting to
You can use the new onError event from Application.cfc
--
<mack />
Neculai Macarie Guest
-
philh #3
Re: CFError and Email Report
This is kinda old hat, but my error handling page is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Error Occurred - Please Retry</title>
</head>
<body><cfoutput>
<form name="sendit" action="errorhandler.cfm" method="post">
<div style="visibility: hidden">
<textarea name="message" rows="1" cols="1">Error Message:
#error.diagnostics#</textarea></div>
<input type="hidden" name="datetime" value="Date/Time: #error.datetime#">
<input type="hidden" name="browser" value="Browser: #error.browser#">
<input type="hidden" name="referrer" value="Referring Page:
#error.httpreferer#">
<input type="hidden" name="address" value="Remote Address:
#error.remoteaddress#">
<input type="hidden" name="template" value="Requested Page: #error.template#">
<input type="hidden" name="mailaddress" value="#error.mailto#">
</form>
</cfoutput>
<script language="JavaScript1.2">sendit.submit()</script>
</body>
</html>
This passes the error values automatically to errorhandler.cfm, which can send
email, and does.
(BTW I require Javascript on my site. Sorry.)
HTH,
philh Guest
-
MattRobertson #4
Re: CFError and Email Report
Put this in your /Application.cfm:
<cferror
type="EXCEPTION"
template="includes/inc_errcatch.cfm">
(of course name the file and place it wherever you want). The
type="EXCEPTION" cferror statement is a blanket error handler that will let you
use any CF code you please. So what you want to do next is to dump out the
CFERROR scope so you can see what the reported error details are. Next you
probably also want to dump out most if not everything in memory so you can
diagnose the problem.
So a quick way to do that is shown in the code window. This will dump out
every scope named in the list parameter (change them as you see fit). The data
will then all be sitting in a nice fat variable (in this case "dataDump") that
you can cfoutput into an email message or a database record (don't try that
with Access as an Access memo field may not be big enough) or store on disk in
a discrete .html file.
Security and size are issues when you dump out data like this. I wrote up a
tutorial that covers the lot that was geared to a site-wide error handler, but
it can easily be used with an app-specific error handler as well.
[url]http://mysecretbase.com/Building_A_ColdFusion_Error_Handler.cfm[/url]
HtH,
--Matt--
MSB Web Systems... [url]http://mysecretbase.com[/url]
If all you have is a hammer, everything looks like a nail.
- Baruch's Observation
<cfsavecontent variable="dataDump">
<cfloop
list="ERROR,APPLICATION,ATTRIBUTES,CALLER,CGI,CLIE NT,FORM,REQUEST,SESSION,SERVE
R,THIS,THISTAG,URL,VARIABLES"
index="loopItem">
<cfif IsDefined("#loopItem#")>
<cfdump
var="#Evaluate(loopItem)#"
label="#loopItem#">
</cfif>
</cfloop>
</cfsavecontent>
MattRobertson Guest



Reply With Quote

