CFERROR Handler
I have an exception error handler - type=exception error=any It mostly works... see http://www.austin-williams.com/_soft_error.cfm - this a bad var name; works as it should and sends me a dump. Now look here: http://www.austin-williams.com/_hard_error.cfm - this is bad cftag name; shows the error on screen. Any idea why the second error is not working with my error handler? Thanks Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353377 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFERROR Handler
ColdFusion can only route runtime errors to an error handler (your soft error). Compile errors (such as invalid tag names) can't be interpreted by ColdFusion and cause a hard error. Not much you can do about that. -Carl V. On 12/6/2012 8:39 AM, Robert Harrison wrote: I have an exception error handler - type=exception error=any It mostly works... see http://www.austin-williams.com/_soft_error.cfm - this a bad var name; works as it should and sends me a dump. Now look here: http://www.austin-williams.com/_hard_error.cfm - this is bad cftag name; shows the error on screen. Any idea why the second error is not working with my error handler? Thanks Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353379 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFERROR Handler
Search the HOF archives. I remember there is a thread about this topic. In brief, error handlers only capture runtime exceptions. That is a compile error, which happens before the code ever executes. So standard cfm error handlers cannot capture it. -Leigh ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353380 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFERROR Handler
Thanks all. That's enough for my needs. I'm actually troubleshooting a related problem, but had to understand this problem first. Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams -Original Message- From: Leigh [mailto:cfsearch...@yahoo.com] Sent: Thursday, December 06, 2012 11:55 AM To: cf-talk Subject: Re: CFERROR Handler Search the HOF archives. I remember there is a thread about this topic. In brief, error handlers only capture runtime exceptions. That is a compile error, which happens before the code ever executes. So standard cfm error handlers cannot capture it. -Leigh ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353381 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFERROR Handler
Seems to me if it generates an error which looks like a ColdFusion error then we should be able to display something other than that error. That is just a common security practice to NOT have debug information go out to the public. If ColdFusion isn't displaying the error, then what is Java? Steve -Original Message- From: Leigh [mailto:cfsearch...@yahoo.com] Sent: Thursday, December 06, 2012 11:55 AM To: cf-talk Subject: Re: CFERROR Handler Search the HOF archives. I remember there is a thread about this topic. In brief, error handlers only capture runtime exceptions. That is a compile error, which happens before the code ever executes. So standard cfm error handlers cannot capture it. -Leigh ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353382 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFERROR Handler
IIRC I think site wide error handlers can catch it. However, compile errors in prod applications is not the norm, since it would mean the code was never tested. -Leigh --- On Thu, 12/6/12, DURETTE, STEVEN J sd1...@att.com wrote: From: DURETTE, STEVEN J sd1...@att.com Subject: RE: CFERROR Handler To: cf-talk cf-talk@houseoffusion.com Date: Thursday, December 6, 2012, 4:59 PM Seems to me if it generates an error which looks like a ColdFusion error then we should be able to display something other than that error. That is just a common security practice to NOT have debug information go out to the public. If ColdFusion isn't displaying the error, then what is Java? Steve -Original Message- From: Leigh [mailto:cfsearch...@yahoo.com] Sent: Thursday, December 06, 2012 11:55 AM To: cf-talk Subject: Re: CFERROR Handler Search the HOF archives. I remember there is a thread about this topic. In brief, error handlers only capture runtime exceptions. That is a compile error, which happens before the code ever executes. So standard cfm error handlers cannot capture it. -Leigh ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353383 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFERROR Handler
Seems to me if it generates an error which looks like a ColdFusion error then we should be able to display something other than that error. That is just a common security practice to NOT have debug information go out to the public. You can! This is why every application should include multiple levels of error handling. Exception handling using CFTRY and the onError event handler can only trap runtime exceptions. If the program in question can't even compile, they do not have any effect. The CFERROR tag can handle compiler errors using TYPE=REQUEST, but nobody uses that any more as a rule. The site-wide error handler can handle compiler errors and runtime exceptions. Of course, you should not have compiler errors on a production site - ever. If you do, this indicates that you have deployed code to production WITHOUT EVER TESTING IT AT ALL. But you should still use the site-wide error handler as a last level of defense against anything that can go wrong. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353384 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFERROR Handler
Thank you all for the input. This was a simulation of the actual problem I'm trying to address and your help gave me what I needed. What I'm really trying to get fixed is server error that comes up in some situations; one of which is the sample hard-error page I posted. I just needed to give my server guy something to prove to him there was some configuration error. I made the hard-error come up on purpose in the sample I sent. The server I'm trying to get fixed is not showing the hard-error, it's crashing. I'm trying to get the crash fixed but needed to show this to him on a server that doesn't crash. Thanks, Robert Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353385 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFERROR Handler
I agree about testing everything before, but I do know people who have been hacked by files being uploaded and executed on their website. That is one way that bad code can get there. I wouldn't be surprised if people didn't do it on purpose just to get at the information that can be provided by debugging output. That's why at first I was confused about this. I didn't even think that the original poster wouldn't use the site-wide error handler. I was thinking that his problem was bypassing it. Sorry I misunderstood. -Original Message- From: Dave Watts [mailto:dwa...@figleaf.com] Sent: Thursday, December 06, 2012 1:19 PM To: cf-talk Subject: Re: CFERROR Handler Seems to me if it generates an error which looks like a ColdFusion error then we should be able to display something other than that error. That is just a common security practice to NOT have debug information go out to the public. You can! This is why every application should include multiple levels of error handling. !--- snip --- Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353386 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm