This displays the error: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <HTML> <HEAD> <TITLE>TBP - Page Request Error</TITLE> </HEAD> <p>An unexpected Page Request error has occurred. If the error persists, the following error details can provide the development team with valuable information to help identify and correct the condition which caused this error. We apologize for the inconvenience and solicit your help in improving the Tau Beta Pi Web-based application. Please provide a short description of what you were doing when the error occurred to the <A HREF="mailto:#Error.Mailto#">Development Team</a>. <i>[NOTE: This information can be sent to the development team by clicking on the EMAIL button located at the lower portion of the screen.]</i> <p><b>Page Request Error Details:</b></p> <small> <form action="ErrorScriptDispatcher.cfm" method="post"> <table width="100%" border="1" cellpadding="2"> <tr> <th width="35%">Attribute</th> <th width="65%">Description</th> </tr> <tr> <td width="35%" align="right" valign="middle">Date & Time:</td> <td width="65%">#Error.DateTime#</td> </tr> <tr> <td width="35%" align="right" valign="middle">Error Message:</td> <td width="65%"><textarea cols="50" rows="18" name="ErrorDiagnostics" onFocus="this.blur();">#Error.Diagnostics#</textarea></td> </tr> <tr> <td width="35%" align="right" valign="middle">Error Page:</td> <td width="65%">#Error.Template#</td> </tr> <tr> <td width="35%" align="right" valign="middle">Referring Page:</td> <td width="65%">#Error.HTTPReferer#</td> </tr> <tr> <td width="35%" align="right" valign="middle">URL Params:</td> <td width="65%">#Error.QueryString#</td> </tr> <tr> <td width="35%" align="right" valign="middle">Client Address:</td> <td width="65%">#Error.RemoteAddress#</td> </tr> <tr> <td width="35%" align="right" valign="middle">Client Browser:</td> <td width="65%">#Error.Browser#</td> </tr> </table> <table> <tr> <td colspan="2">Your Email Address: <input type="text" name="EmailAddress" size="30" maxlength="50"></td> </tr> <tr> <td><input type="submit" name="btnAction" value="EMail to Developers"></td> <td><input type="submit" name="btnAction" value="Continue"></td> </tr> </table> <input type="hidden" name="ErrorDateTime" value="#Error.DateTime#"> <input type="hidden" name="ErrorTemplate" value="#Error.Template#"> <input type="hidden" name="ErrorHTTPReferer" value="#Error.HTTPReferer#"> <input type="hidden" name="ErrorQueryString" value="#Error.QueryString#"> <input type="hidden" name="ErrorRemoteAddress" value="#Error.RemoteAddress#"> <input type="hidden" name="ErrorBrowser" value="#Error.Browser#"> <input type="hidden" name="FormID" value="ErrorCFRequest"> </form> </small> </body> </html>
And this is where it posts to email the message. <!---------------------------------------------------- Send e-mail notification of script error to developers -----------------------------------------------------> <cfsetting enablecfoutputonly="Yes"> <cfset LF=Chr(10)> <cfset TErrorDiagnostics=Form.ErrorDiagnostics> <cfset TErrorDiagnostics=ReplaceNoCase(Form.ErrorDiagnostics,"</p><p><p>","","ALL") > <cfset TErrorDiagnostics=ReplaceNoCase(TErrorDiagnostics,"<p> ",LF,"ALL")> <cfset TErrorDiagnostics=ReplaceNoCase(TErrorDiagnostics,"<p>",LF,"ALL")> <cfset TErrorPage=Form.ErrorTemplate> <cfset TErrorDateTime=ParseDateTime(Form.ErrorDateTime)> <cfmail to="#TMailAddr#" from="#LCase(Variables.From)#" subject="Scripting Logic Flaw"> A script error has occurred in the application on #DateFormat(TErrorDateTime,"DDDD, MMMM D, YYYY")# at #TimeFormat(TErrorDateTime,"h:mm:ss tt")#. The following provides details of the error message and information to aid in the correction of the error. Error Message: #TErrorDiagnostics# Error Page: #TErrorPage# Referring Page: #GetFileFromPath(Form.ErrorHTTPReferer)# URL Parameters: #Form.ErrorQueryString# Remote Address of WorkStation: #Form.ErrorRemoteAddress# Browser Type: #Form.ErrorBrowser# This error message has also been logged on the ColdFusion server and can be view by accessing the APPLICATION.LOG file on the server. </cfmail> <cfsetting enablecfoutputonly="No"> Ray Thompson Systems Administrator Tau Beta Pi Association www.tbp.org The Engineering Honor Society Integrity and Excellence in Engineering > -----Original Message----- > From: Tony Weeg [mailto:[EMAIL PROTECTED] > Sent: Friday, September 12, 2003 8:57 AM > To: CF-Talk > Subject: error template snippet > > > hi there. > > just trying to throw together a good error template to email > me when any page on our site experiences and error, does > anyone have a good set of code that would include some good > error information that I could snag? > > thanks. > tony > > tony weeg > sr. web applications architect > navtrak, inc. > [EMAIL PROTECTED] > www.navtrak.net > office 410.548.2337 > fax 410.860.2337 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com

