Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Thanks again for taking the time to look this over, Sean! -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202028 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
On Apr 7, 2005 5:42 PM, Matt Robertson <[EMAIL PROTECTED]> wrote: > OK its very simple code. I'll send it over. Mostly what I posted > already. But it doesn't happen on my live server. Only my dev box > here on my desktop, where I could put in a simple s/w error handler on > a relatively clean system. The live box is probably better patched > than this desktop. Here's the result of my tests: CF7 - works just fine. CF6.1 Updater 1 (6,1,0,83762) - works just fine. CF6 unpatched (6,1,0,63958) - random behavior including hangs, apparent right behavior (followed by a crash) etc. So it looks like a bug that got fixed - and is not longer present in CFMX 6.1 Updater 1 (nor CFMX 7). -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? -- I have 50, yes 50, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201995 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Sorry, my typo in the mail... I did try both combinations of incorrect code and didn't see a raw dump of an error. My CF version is reported as 6,1,0,hf56580_611 which is I believe as of now, a fully patched box. This is the dev box and it gets everything that production gets at least a week before unless the patch is uber urgent then its more like a few hours before Paul ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201966 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Your first example is correct cfcode. Maybe a typo when you wrote the msg? Should be #cgi.http_user_agent#http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201965 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Hi Matt, With your example, every which way I try it, the sitewide error handler runs and I don't see any extra raw error like you see in your screenshot... Both #cgi.http_user_agent# and cfoutput>#cgi.http_user_agent# simply dump the scopes you are referencing in the error handler code. I've tested this in MX 6.1 fully patched and MX 7. Paul -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED] Sent: Friday, 08 April 2005 01:17 To: CF-Talk Subject: Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors? Here's a gif of what it looks like on my dev server http://foohbar.com/kaboom/errorscreen.gif And to stir the pot further, Its NOT doing it on my live server. I uploaded the same bad code to a live web site and my own site-wide error handler works fine. It may be that the for-real error handler i have runs thru a cfswitch, which then branches out to different cfincludes to do stuff depending on what domain is involved cfswitch expression=#cgi.http_server_name# cfcase value=foohbar.com cfinclude template=cfdumper.cfm cfinclude template=dumpemailer.cfm cfinclude template=friendlyerrorscreen.cfm /cfcase /cfswitch so maybe if you run thru other templates like this the problem never happens. Talk about an obscure bug. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201964 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
OK its very simple code. I'll send it over. Mostly what I posted already. But it doesn't happen on my live server. Only my dev box here on my desktop, where I could put in a simple s/w error handler on a relatively clean system. The live box is probably better patched than this desktop. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201963 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Here's a gif of what it looks like on my dev server http://foohbar.com/kaboom/errorscreen.gif And to stir the pot further, Its NOT doing it on my live server. I uploaded the same bad code to a live web site and my own site-wide error handler works fine. It may be that the for-real error handler i have runs thru a cfswitch, which then branches out to different cfincludes to do stuff depending on what domain is involved cfswitch expression=#cgi.http_server_name# cfcase value=foohbar.com cfinclude template=cfdumper.cfm cfinclude template=dumpemailer.cfm cfinclude template=friendlyerrorscreen.cfm /cfcase /cfswitch so maybe if you run thru other templates like this the problem never happens. Talk about an obscure bug. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201961 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
And if you can create a relatively self-contained reproducible test case with instructions, send it to me and I'll test it on various CF versions and if it's still broken in CF7, I'll file a bug! On Apr 7, 2005 5:05 PM, Paul Vernon <[EMAIL PROTECTED]> wrote: > I follow all that... I'll see if I can re-create it here... ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201960 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Ok, I follow all that... I'll see if I can re-create it here... Paul ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201958 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
I am setting up the site-wide error handler in the CF Administrator. Its called whammo.cfm and its code is displayed in my original post on this. Then there's the try/catch error handler. Thats oops.cfm and its declared at the bottom of /Application.cfm. It has the same code as whammo.cfm only it displays 'oops' instead of 'whammo' so I can be sure which template is firing. Then there's oops.html. Its just an html display page whose sole purpose is to tell me when what I'm seeing is coming from cferror. I'd do more of course in a real app and not a demo like this. > The thing with the errors that you are creating is that the two mods to the > code you made will have very different results and I don't think the error > handlers that are declared in your pages will ever fire under the > circumstances you are describing... I know. I'm not expecting them to. I'm expecting the site-wide error handler to pick it up. And it is. *But* its also exposing raw ColdFusion messages in one specific circumstance. *Thats* the deal here: Raw errors can make it to the screen even if you have a site-wide error handler, which is never supposed to happen. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201957 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Are you declaring your site wide error handlers in the application file or are you declaring them in the CFADMIN area? The thing with the errors that you are creating is that the two mods to the code you made will have very different results and I don't think the error handlers that are declared in your pages will ever fire under the circumstances you are describing... Also I just spotted this You are referencing an oops.html and an oops.cfm file in the same template as different error handlers... Is that correct??? Paul ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201956 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Paul, What I was getting at is not that the template wasn't doing its catch thing due to malformed CF. I understand why that won't compile. The issue I found is that I can also cause the sidte-wide error handler to break as well, but break in an odd way that exposes a raw CF error message AFTER it runs. The site-wide handler runs some CF, and then has a cfabort in it for good measure. Only it doesn't cfabort. It runs its CF (which in this case displays the error and/or catch scopes) and THEN displays the raw cf error message. This is a separate template from the one with the malformed code. Further, by altering the location of the error I can get the site-wide error handler to function properly again. Its not something that is going to happen often, I think. The message I suppose is never screw up a CF tag before a CFCATCH or your raw error is going onscreen. I did all this on a copy of 6.1. Is this by chance an issue at all in CF7? -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201954 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
I've got part of the answer. Its a bug in ColdFusion. In the previous example I created an error just in front of the CFCATCH statement, so the value of error.message is Invalid token 'c' found on line 6 at column 2. Line 8 is and is the highlighted line on the raw CF error message. If instead I cause the error to the opening cfoutput instead of the closing one just before the cfcatch line, like this: cfoutput>#cgi.http_user_agent# The cfcatch template doesn't fire, but the site-wide error handler fires properly and doesn't display a raw message. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201953 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
and it's very unlikely (even with minor testing) that a malformed tag would make it into production ;-) I think Paul's answer is a good one for all to remember..CF can only do so much...and it sure can't read your mind and extrapolate what the rest of the code in the file should be...hehe Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201952 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Correct me if I misunderstood what you are getting with your last example but from what I can tell the explanation below seems reasonable to me Because your last example doesn't even get compiled due to the closing > being missing on the cfoutput, CF doesn't see any code that you have in that template at all... Therefore the http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201951 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
I've been playing around with this and I see a problem can't solve. I can force a raw CF error to screen, regardless of whether you have try/catch, a site-wide error handler or cferror (or all three). I start out with this /Application.cfm #haha.notexists# which has a query loop to a nonexistent query. I get a raw cf error. Fine. Then I change the file to hold a cferror statement and a try/catch #haha.notexists# The catch template kicks in and takes precedence. Fine again. If I remove try/catch, leave in the cferror statement and plug in a sitewide error handler then the site-wide error handler is *ignored* and the cferror statement fires. That was an ugly surprise, but either by luck or design (I forget to be honest) I only use cferror on my own servers for validation, but on the commercial stuff I use it as a backup as described. Better write some more docs (it makes sense since CF is just doing what I told it). Removing the CFERROR statement caused the site-wide template to finally fire. Now for the real nasty. If I deliberately malform a CF tag like this I can force the error to come out raw again (note the unclosed /cfoutput): #cgi.http_user_agent# Then the cfcatch routine is ignored, as is the cferror statement. The site-wide error handler fires AND the raw cf error is displayed. My site-wide 'handler' is below. WHAMMO How did something like this happen and how can it be prevented? -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201950 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
On Apr 7, 2005 2:37 PM, Matt Robertson <[EMAIL PROTECTED]> wrote: > What you can't do is put your try in /Application.cfm and your catch > in OnRequestEnd.cfm. Thinking on it I can't see a reason why > /Application.cfm can't have its own try/catch, unless there's a cf > rule somewhere that says so. Each file must be a syntactically valid unit of ColdFusion code: you can't open a tag in one file and close it in another. Each file is compiled separately (which is why it must be syntactically valid). -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? -- I have 50, yes 50, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201948 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
Hey Matt...it does work..and it's already in production ;-) Thanks Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201947 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
On Apr 7, 2005 10:48 AM, Bryan Stevenson <[EMAIL PROTECTED]> wrote: > Thanks Matt ;-) No problem, and you were right that something was off in that try/catch thing I was talking about. I was going off hazy memory. What you can't do is put your try in /Application.cfm and your catch in OnRequestEnd.cfm. Thinking on it I can't see a reason why /Application.cfm can't have its own try/catch, unless there's a cf rule somewhere that says so. I use cferror now but I'm going to look at wrapping an entire /Application.cfm in a try/catch. May still be a reason it doesn't work but its something I've let sit as-is for so long its probably a little fossilized. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201946 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
SOLVED: Re: CFTRY/CFCATCH exposing CF errors?
> When it blows inside of /Application.cfm, which isn't subject to > try/catch. I try to but up a backup cferror statement inside of that > file as high up as possible for just that reason. My bad...it is crashing inside Application.cfm...so it's off to implement a CFERROR solution Thanks Matt ;-) Bryan Stevenson B.Comm. VP & Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web: www.electricedgesystems.com/tiny.cfm/54 ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201924 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54