Matthew, as for that original approach you found, it likely stemmed from primordial days when CFERROR could NOT point to a CFM page that did things like CFMAIL. I could only point either to an HTML page or a CFML page with very limited functionality (it could output variables to the screen and nothing more). That may be why you saw folks doing what they did in that older code.
As of CF4, CFERROR had a new type="exception" (as against that older type="request") which could now point to any regular CFM file doing any normal CFML processing. If you missed it in your thread last week about error handling, I had pointed to a series of articles I'd done on the topic, and it covered that above, and lots more, which may really be worth your spending a half hour digesting so that you better understand the landscape of CF error handling. Again, part 1 is here (and the page lists the other parts as well): http://www.carehart.org/articles/#2000_10 Hope that helps. /charlie From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Matthew Nicholson Sent: Tuesday, March 15, 2011 11:12 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Problems with Errors and Quotes Thank you all for the excellent suggestions! I think my first problem was that I simply was following what was built into the system initially. (Which was basically nothing and bad handling of the errors.) I had a feeling this was being way more difficult than necessary, I'll see what I can do today and pose a question or two should I run into more silly problems. :D Matthew R. Nicholson To find what you seek in the road of life, the best proverb of all is that which says: "Leave no stone unturned." ~Edward Bulwer Lytton From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Douglas Knudsen Sent: Tuesday, March 15, 2011 9:49 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Problems with Errors and Quotes also to note,CFQUERYPARAM, which you should certainly be using, handles mixed quotes and single ticks on DB insert/updates. In the past I have trapped Error.Diagnostic along with other Error properties into a DB table. I then had a scheduled job running a nightly error report as well as a job that did a error count, if a spike in errors occurred, we all got a SMS. Douglas Knudsen http://www.cubicleman.com this is my signature, like it? On Tue, Mar 15, 2011 at 9:00 AM, DeJong, Nathan D. <nathan.dej...@emory.edu> wrote: Try replacing the quote with its HTML entity: Replace(Error.Diagnostics, """", """, "all") Thanks, Nathan DeJong Applications Developer Oxford College of Emory University <mailto:nathan.dej...@emory.edu> nathan.dej...@emory.edu 770-784-4662 From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Steve Ross Sent: Tuesday, March 15, 2011 8:37 AM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Problems with Errors and Quotes To expand on what troy said: <cfsavecontent var="the_error"> <cfdump var="cfcatch"> </cfsavecontent> then mail "the_error" On Mon, Mar 14, 2011 at 10:06 PM, Troy Jones <t...@dynapp.com> wrote: I'd just dump the cfcatch structure in cfmail or cferror if done through an error handling script, as John suggests. da_logo_70x263 ____________________________________________________________________________ _______________ Troy Jones | Developer/Support Technician | Dynapp Inc | 1-800-830-5192 ext. 603 | <http://www.dynapp.com/> dynapp.com | <http://www.facebook.com/dynapp> facebook.com/dynapp From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of John Youngman Sent: Monday, March 14, 2011 6:07 PM To: discussion@acfug.org Subject: Re: [ACFUG Discuss] Problems with Errors and Quotes Could u not just use cfmail in a global error handler script? Sent from my iPhone On Mar 14, 2011, at 5:54 PM, "Matthew Nicholson" <matthew.nichol...@soltech.net> wrote: Evening All! I'd love your thoughts on a sort of odd-ball problem. Here's the situation: I'm attempting to capture all error messages generated from my code and then send an email. I do this by passing all the information into an HTML form and then shooting off a CFMail with all the necessary information in it. Here's the problem: During this translation into HTML, text like this; Error Executing Database Query. [Macromedia][SQLServer JDBC Driver][SQLServer]The DELETE statement conflicted with the REFERENCE constraint "FK_name". The conflict occurred in database "QA-tracker", table "dbo.table", column 'column_id'. The error occurred on line 131. truly does a number on the HTML form and escapes out displaying a portion of the error to the users. I've tried the following to try to clean up this mess but have yet to find a viable solution (or my syntax can be horrendously off. either way) HTMLCodeFormat(Error.Diagnostics) HTMLEditFormat(Error.Diagnostics) Replace(Error.Diagnostics, " "" ", "", "All") <CFSET variable = REReplaceNoCase(#Error.Diagnostics#, '[^[:alnum:]]', '', 'all')> Any thoughts or suggestions would be greatly appreciated at this point! Thanks! Matthew R. Nicholson To find what you seek in the road of life, the best proverb of all is that which says: "Leave no stone unturned." ~Edward Bulwer Lytton ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ------------------------------------------------------------- _____ No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1204 / Virus Database: 1498/3506 - Release Date: 03/14/11 -- Steve Ross web application & interface developer http://blog.stevensross.com [mobile] (912) 344-8113 <tel:%28912%29%20344-8113> [ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ] _____ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments). ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
<<image001.jpg>>