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. 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
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
> 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
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 wrote: From: DURETTE, STEVEN J Subject: RE: CFERROR Handler To: "cf-talk" 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. 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
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
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
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 tag with type exception not working
are you sure the error template you are pointing to exists at the path specified in the CFERROR tag, and does not contain any errors itself ? what happens if you browse directly to the error template ? On Mon, Apr 4, 2011 at 7:06 PM, Jay Pandya wrote: > > >trying setting the type to any and then it will show you the error and you > >will be able to see what the error type is, maybe a different error is > >occurring and it is not an exception type. > > > > All ready tried with exception as any.But when i am using type as exception > it is showing normal error page only.Not exception handling page. > > > ~| 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:343534 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cferror tag with type exception not working
>trying setting the type to any and then it will show you the error and you >will be able to see what the error type is, maybe a different error is >occurring and it is not an exception type. > All ready tried with exception as any.But when i am using type as exception it is showing normal error page only.Not exception handling page. ~| 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:343533 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cferror tag with type exception not working
>trying setting the type to any and then it will show you the error and you >will be able to see what the error type is, maybe a different error is >occurring and it is not an exception type. I all ready tried those things.If i put the type as exception and exception as any though,i am not getting error handling page.It is showing normal error page only. ~| 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:343532 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cferror tag with type exception not working
trying setting the type to any and then it will show you the error and you will be able to see what the error type is, maybe a different error is occurring and it is not an exception type. On Mon, Apr 4, 2011 at 10:35 AM, Jay Pandya wrote: > > In my local when i am using cferror tag with type as exception then it is > showing proper error message etc but in production it is not working.type as > request work there.But my goal of sending email to admin when error occurs > is not full filling.I have searched on Google and every forum,though i have > not get any solution.CF8. Do i need to make any changes in the web-inf > folder etc..Any patch need to be installed? > > Operating system is windows 2003 > Server IIS > Coldfusion Version : CF8 > > Any idea? Please let me know if anybody have any resolution. > > ~| 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:343526 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cferror / cfmail issue
thx, I'm not sure what is going on.. it started to work again after I reverted back to the original files before I started messing with it. WEIRD! Thanks guys! -Original Message- From: Mike Chabot [mailto:mcha...@gmail.com] Sent: Thursday, January 28, 2010 1:34 PM To: cf-talk Subject: Re: cferror / cfmail issue Since you say that the E-mail does not get sent I would assume you have an error in your error handler. Try simplifying the error E-mail to send "hello world" to see if that works. If that works, build up the code incrementally until it breaks. Check all your log files to get hints on what the secondary error is. The suggestions made by Qing Xia seem good. -Mike Chabot On Thu, Jan 28, 2010 at 2:41 PM, Tim Do wrote: > > We just upgraded to cf9 and my error handling is no longer working the way it > used to. In my application.cfm I have: > > template="errorPage.cfm" > mailto="webmas...@wng.com"> > > and within errorPage.cfm I have: > > Error: > > Session: > > Client: > > Application: > > Request: > > Form: > > Url: > > Cookie: > > > > > The page error shows up fine with my error notice, BUT the cfmail section it > just displays : > > Error: > Session: > > Client: > > Application: > > Request: > > Form: > > Url: > > Cookie: > > Without the variables, and the email does not go out. Why would it display > the code inside of the cfmail tags instead of sending?? All other cfmail > tags work fine throughout the site. > > Thanks! > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330247 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror / cfmail issue
Since you say that the E-mail does not get sent I would assume you have an error in your error handler. Try simplifying the error E-mail to send "hello world" to see if that works. If that works, build up the code incrementally until it breaks. Check all your log files to get hints on what the secondary error is. The suggestions made by Qing Xia seem good. -Mike Chabot On Thu, Jan 28, 2010 at 2:41 PM, Tim Do wrote: > > We just upgraded to cf9 and my error handling is no longer working the way it > used to. In my application.cfm I have: > > template="errorPage.cfm" > mailto="webmas...@wng.com"> > > and within errorPage.cfm I have: > > Error: > > Session: > > Client: > > Application: > > Request: > > Form: > > Url: > > Cookie: > > > > > The page error shows up fine with my error notice, BUT the cfmail section it > just displays : > > Error: > Session: > > Client: > > Application: > > Request: > > Form: > > Url: > > Cookie: > > Without the variables, and the email does not go out. Why would it display > the code inside of the cfmail tags instead of sending?? All other cfmail > tags work fine throughout the site. > > Thanks! > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330244 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror / cfmail issue
What does your sendError page look like? Same as quoted in your first email? If so, do a dump on #variables#. I wonder if is not liking the mail server attribute. Also put in a simple cfmail tag in the sendError file to generate an email to yourself. Does that email go out correctly? Oh, and check your mail spool folder--has anything got stuck there? On Thu, Jan 28, 2010 at 4:09 PM, Tim Do wrote: > > so I put back both cferror tags one for request and one for exception. I > forced a db error and I see the dump from the sendError page, but when I > wrap a cfmail around it, I get nothing but the text from the errorPage. > > -Original Message- > From: Qing Xia [mailto:txiasum...@gmail.com] > Sent: Thursday, January 28, 2010 12:21 PM > To: cf-talk > Subject: Re: cferror / cfmail issue > > > When type="request", the error template is not supposed to contain any CFML > tags, and you may only refer to a handful of special variables in the error > scope. > > When you said you have both and request and exception values... did you > mean > you have two CFError tags in application.cfm, one with type="request" and > the other with type="exception"? > > Maybe the type="exception" template itself contained an error and never got > to the mail generation part. To be sure, in your development environment: > >1. Purposefully put in some wacky code to generate errors > 2. For now, comment out the > 3. Try cfdump and cfabort in the type="exception" error template, from >top down, until you get to the CFMail tag. > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330243 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror / cfmail issue
so I put back both cferror tags one for request and one for exception. I forced a db error and I see the dump from the sendError page, but when I wrap a cfmail around it, I get nothing but the text from the errorPage. -Original Message- From: Qing Xia [mailto:txiasum...@gmail.com] Sent: Thursday, January 28, 2010 12:21 PM To: cf-talk Subject: Re: cferror / cfmail issue When type="request", the error template is not supposed to contain any CFML tags, and you may only refer to a handful of special variables in the error scope. When you said you have both and request and exception values... did you mean you have two CFError tags in application.cfm, one with type="request" and the other with type="exception"? Maybe the type="exception" template itself contained an error and never got to the mail generation part. To be sure, in your development environment: 1. Purposefully put in some wacky code to generate errors 2. For now, comment out the 3. Try cfdump and cfabort in the type="exception" error template, from top down, until you get to the CFMail tag. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330242 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror / cfmail issue
so I put back both cferror tags one for request and one for exception. I forced a db error and I see the dump from the sendError page, but when I wrap a cfmail around it, I get nothing but the text from the errorPage. -Original Message- From: Qing Xia [mailto:txiasum...@gmail.com] Sent: Thursday, January 28, 2010 12:21 PM To: cf-talk Subject: Re: cferror / cfmail issue When type="request", the error template is not supposed to contain any CFML tags, and you may only refer to a handful of special variables in the error scope. When you said you have both and request and exception values... did you mean you have two CFError tags in application.cfm, one with type="request" and the other with type="exception"? Maybe the type="exception" template itself contained an error and never got to the mail generation part. To be sure, in your development environment: 1. Purposefully put in some wacky code to generate errors 2. For now, comment out the 3. Try cfdump and cfabort in the type="exception" error template, from top down, until you get to the CFMail tag. On Thu, Jan 28, 2010 at 2:56 PM, Tim Do wrote: > > went from 7 to 9. I have both request and exception but still doesn't > work. just looking through my logs again... I haven't received an error > email in a few days so not sure it's related to the upgrade. I can't say my > code is that solid, usually get a couple a day, so most likely this has not > sent in a few days. any other ideas?? I tried wrapping the error info into > cfsavecontent and still shows the error info and doesn't send. > > -Original Message- > From: Qing Xia [mailto:txiasum...@gmail.com] > Sent: Thursday, January 28, 2010 11:53 AM > To: cf-talk > Subject: Re: cferror / cfmail issue > > > What CF version were you on before this recent upgrade to CF9? Try changing > the TYPE attribute in the CFError tag to type="exception", and see what > happens. > > > > On Thu, Jan 28, 2010 at 2:41 PM, Tim Do wrote: > > > > > We just upgraded to cf9 and my error handling is no longer working the > way > > it used to. In my application.cfm I have: > > > > >template="errorPage.cfm" > >mailto="webmas...@wng.com"> > > > > and within errorPage.cfm I have: > > > >Error: > > > >Session: > > > >Client: > > > >Application: > > > >Request: > > > >Form: > > > >Url: > > > >Cookie: > > > > > > > > > > The page error shows up fine with my error notice, BUT the cfmail section > > it just displays : > > > > Error: > > Session: > > > > Client: > > > > Application: > > > > Request: > > > > Form: > > > > Url: > > > > Cookie: > > > > Without the variables, and the email does not go out. Why would it > display > > the code inside of the cfmail tags instead of sending?? All other cfmail > > tags work fine throughout the site. > > > > Thanks! > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330241 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror / cfmail issue
so I put back both cferror tags one for request and one for exception. I forced a db error and I see the dump from the sendError page, but when I wrap a cfmail around it, I get nothing but the text from the errorPage. -Original Message- From: Qing Xia [mailto:txiasum...@gmail.com] Sent: Thursday, January 28, 2010 12:21 PM To: cf-talk Subject: Re: cferror / cfmail issue When type="request", the error template is not supposed to contain any CFML tags, and you may only refer to a handful of special variables in the error scope. When you said you have both and request and exception values... did you mean you have two CFError tags in application.cfm, one with type="request" and the other with type="exception"? Maybe the type="exception" template itself contained an error and never got to the mail generation part. To be sure, in your development environment: 1. Purposefully put in some wacky code to generate errors 2. For now, comment out the 3. Try cfdump and cfabort in the type="exception" error template, from top down, until you get to the CFMail tag. On Thu, Jan 28, 2010 at 2:56 PM, Tim Do wrote: > > went from 7 to 9. I have both request and exception but still doesn't > work. just looking through my logs again... I haven't received an error > email in a few days so not sure it's related to the upgrade. I can't say my > code is that solid, usually get a couple a day, so most likely this has not > sent in a few days. any other ideas?? I tried wrapping the error info into > cfsavecontent and still shows the error info and doesn't send. > > -Original Message- > From: Qing Xia [mailto:txiasum...@gmail.com] > Sent: Thursday, January 28, 2010 11:53 AM > To: cf-talk > Subject: Re: cferror / cfmail issue > > > What CF version were you on before this recent upgrade to CF9? Try changing > the TYPE attribute in the CFError tag to type="exception", and see what > happens. > > > > On Thu, Jan 28, 2010 at 2:41 PM, Tim Do wrote: > > > > > We just upgraded to cf9 and my error handling is no longer working the > way > > it used to. In my application.cfm I have: > > > > >template="errorPage.cfm" > >mailto="webmas...@wng.com"> > > > > and within errorPage.cfm I have: > > > >Error: > > > >Session: > > > >Client: > > > >Application: > > > >Request: > > > >Form: > > > >Url: > > > >Cookie: > > > > > > > > > > The page error shows up fine with my error notice, BUT the cfmail section > > it just displays : > > > > Error: > > Session: > > > > Client: > > > > Application: > > > > Request: > > > > Form: > > > > Url: > > > > Cookie: > > > > Without the variables, and the email does not go out. Why would it > display > > the code inside of the cfmail tags instead of sending?? All other cfmail > > tags work fine throughout the site. > > > > Thanks! > > > > > > > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330240 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror / cfmail issue
When type="request", the error template is not supposed to contain any CFML tags, and you may only refer to a handful of special variables in the error scope. When you said you have both and request and exception values... did you mean you have two CFError tags in application.cfm, one with type="request" and the other with type="exception"? Maybe the type="exception" template itself contained an error and never got to the mail generation part. To be sure, in your development environment: 1. Purposefully put in some wacky code to generate errors 2. For now, comment out the 3. Try cfdump and cfabort in the type="exception" error template, from top down, until you get to the CFMail tag. On Thu, Jan 28, 2010 at 2:56 PM, Tim Do wrote: > > went from 7 to 9. I have both request and exception but still doesn't > work. just looking through my logs again... I haven't received an error > email in a few days so not sure it's related to the upgrade. I can't say my > code is that solid, usually get a couple a day, so most likely this has not > sent in a few days. any other ideas?? I tried wrapping the error info into > cfsavecontent and still shows the error info and doesn't send. > > -Original Message- > From: Qing Xia [mailto:txiasum...@gmail.com] > Sent: Thursday, January 28, 2010 11:53 AM > To: cf-talk > Subject: Re: cferror / cfmail issue > > > What CF version were you on before this recent upgrade to CF9? Try changing > the TYPE attribute in the CFError tag to type="exception", and see what > happens. > > > > On Thu, Jan 28, 2010 at 2:41 PM, Tim Do wrote: > > > > > We just upgraded to cf9 and my error handling is no longer working the > way > > it used to. In my application.cfm I have: > > > > >template="errorPage.cfm" > >mailto="webmas...@wng.com"> > > > > and within errorPage.cfm I have: > > > >Error: > > > >Session: > > > >Client: > > > >Application: > > > >Request: > > > >Form: > > > >Url: > > > >Cookie: > > > > > > > > > > The page error shows up fine with my error notice, BUT the cfmail section > > it just displays : > > > > Error: > > Session: > > > > Client: > > > > Application: > > > > Request: > > > > Form: > > > > Url: > > > > Cookie: > > > > Without the variables, and the email does not go out. Why would it > display > > the code inside of the cfmail tags instead of sending?? All other cfmail > > tags work fine throughout the site. > > > > Thanks! > > > > > > > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330238 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror / cfmail issue
went from 7 to 9. I have both request and exception but still doesn't work. just looking through my logs again... I haven't received an error email in a few days so not sure it's related to the upgrade. I can't say my code is that solid, usually get a couple a day, so most likely this has not sent in a few days. any other ideas?? I tried wrapping the error info into cfsavecontent and still shows the error info and doesn't send. -Original Message- From: Qing Xia [mailto:txiasum...@gmail.com] Sent: Thursday, January 28, 2010 11:53 AM To: cf-talk Subject: Re: cferror / cfmail issue What CF version were you on before this recent upgrade to CF9? Try changing the TYPE attribute in the CFError tag to type="exception", and see what happens. On Thu, Jan 28, 2010 at 2:41 PM, Tim Do wrote: > > We just upgraded to cf9 and my error handling is no longer working the way > it used to. In my application.cfm I have: > > template="errorPage.cfm" >mailto="webmas...@wng.com"> > > and within errorPage.cfm I have: > >Error: > >Session: > >Client: > >Application: > >Request: > >Form: > >Url: > >Cookie: > > > > > The page error shows up fine with my error notice, BUT the cfmail section > it just displays : > > Error: > Session: > > Client: > > Application: > > Request: > > Form: > > Url: > > Cookie: > > Without the variables, and the email does not go out. Why would it display > the code inside of the cfmail tags instead of sending?? All other cfmail > tags work fine throughout the site. > > Thanks! > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330236 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cferror / cfmail issue
What CF version were you on before this recent upgrade to CF9? Try changing the TYPE attribute in the CFError tag to type="exception", and see what happens. On Thu, Jan 28, 2010 at 2:41 PM, Tim Do wrote: > > We just upgraded to cf9 and my error handling is no longer working the way > it used to. In my application.cfm I have: > > template="errorPage.cfm" >mailto="webmas...@wng.com"> > > and within errorPage.cfm I have: > >Error: > >Session: > >Client: > >Application: > >Request: > >Form: > >Url: > >Cookie: > > > > > The page error shows up fine with my error notice, BUT the cfmail section > it just displays : > > Error: > Session: > > Client: > > Application: > > Request: > > Form: > > Url: > > Cookie: > > Without the variables, and the email does not go out. Why would it display > the code inside of the cfmail tags instead of sending?? All other cfmail > tags work fine throughout the site. > > Thanks! > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330235 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror remove frames
You can't remove the frames without a page referesh, but you should be able to pull them all to zero width/height with JS to give the appearance of a full page. However, I'd generally recommend redirecting to a dedicated error page rather than showing errors "inline". If you do that, just throw some frames busting code at the top and you're set. cheers, barneyb -- Barney Boisvert bboisv...@gmail.com http://www.barneyb.com/ On Jul 21, 2009, at 7:00 AM, Mark McArthey wrote: > > Hello all! > I have a custom page for errors and would like to know if it's > possible to remove all frames from the page prior to displaying the > error page? Currently I have an example where the error is being > displayed in the header of a page (with no scrollbars, of course). > I'd like to remove all frames prior to displaying the error page so > it can be viewed full screen. > > Thanks! > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324758 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror request and form.fieldnames
> I'm trying to generate a custom error page of type "request" and still obtain > the > form.fieldnames. Is it possible to get the information from the parent page > once the > error page has been called? No, the Form scope is unavailable in an error page when you use TYPE="REQUEST". I would recommend that you reserve this for last-ditch error handling, and use TYPE="EXCEPTION" and exception handling in addition; this will give you significantly more functionality. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324659 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror question
Thanks G. >IIRC HTTPReferer is a CGI variable as in CGI.HTTPReferer check the docs on >what vars error returns. > >G! > > > >> ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317550 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror question
IIRC HTTPReferer is a CGI variable as in CGI.HTTPReferer check the docs on what vars error returns. G! On Wed, Jan 7, 2009 at 2:49 PM, John P wrote: > I'm setting up a cferror template that collects the following info. > > INSERT INTO Errors(HTTPReferrer, Diags, Query, Page) > VALUES ('#ERROR.HTTPReferer# ', '#Error.Diagnostics#', > '#Error.QueryString#', '#ERROR.Template#') > > I'm getting a cf error saying that httpreferrer is undefined in error. Is > there a setting in the cf administrator that I'm missing. I have it working > on a different server. > > Thanks, > > John > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317548 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cferror wont fire on syntax problems
I'm not sure what version of CF you're running, however if its 7+ then I would look at moving over to Application.cfc, its far more comprehensive in a great many ways. You can then use the onError() method to handle any exceptions thrown, it's quite a bit cleaner. Rob -Original Message- From: Michael E. Carluen [mailto:[EMAIL PROTECTED] Sent: 15 October 2007 16:25 To: CF-Talk Subject: cferror wont fire on syntax problems I have the following catch-all cferror in place on my application.cfm: However, If I run my test page with a bad cf syntax #now(#, it still displays the default error display thrown by CF, and not my specified template. Any ideas, suggestions anyone? ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291124 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror on application.cfm not working (?)
CF can only have one missing template handler, and it can be used by all sites. So if they have set it as 404.cfm then all you have to do is create a 404.cfm in the root of your site. So just ask HMS what their settings are. Russ -Original Message- From: Michael E. Carluen [mailto:[EMAIL PROTECTED] Sent: 22 November 2006 22:15 To: CF-Talk Subject: RE: cferror on application.cfm not working (?) Thanks Ray, Will, Jon, For this app, I am currently using HMS on a shared server. This means I do not have access to the CF Administrator for setting the .cfm missing template handler. And HMS's (control panel) custom error template mgt only catches .htm missing templates. Can the missing template handler be programmatically done on application.cfm or anywhere else? I figure CF finds application.cfm before executing the actual requested page. (Pls correct me if I'm wrong.) Thanks again. > > > Michael, > > > > A template error is thrown before anything else. You'll need to > > handle those through your missing template handler - which you can > > set in the CFAdmin. > > > > Jon > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261537 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror on application.cfm not working (?)
Thanks for confirming Ray. Anyway, I contacted HMS, and they were able to modify the server's IIS 404 settings to include .cfm templates. > -Original Message- > From: Raymond Camden [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 22, 2006 2:33 PM > To: CF-Talk > Subject: Re: cferror on application.cfm not working (?) > > Unfortunately no. At least not as far as I know. > > On 11/22/06, Michael E. Carluen <[EMAIL PROTECTED]> wrote: > > Thanks Ray, Will, Jon, > > > > For this app, I am currently using HMS on a shared server. This means I > do > > not have access to the CF Administrator for setting the .cfm missing > > template handler. And HMS's (control panel) custom error template mgt > only > > catches .htm missing templates. > > > > Can the missing template handler be programmatically done on > application.cfm > > or anywhere else? I figure CF finds application.cfm before executing > the > > actual requested page. (Pls correct me if I'm wrong.) > > > > Thanks again. > > > > > > > > > > > Michael, > > > > > > > > A template error is thrown before anything else. You'll need to > > > > handle those through your missing template handler - which you can > > > > set in the CFAdmin. > > > > > > > > Jon > > > > > > > > > > > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261530 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror on application.cfm not working (?)
Wouldn't App.cfm have to be called *after* the requested template -- because CF looks for App.cfm based on the location of the requested page (goes up the hierarchy relative to the requested page). So if the page is missing, it couldn't find App.cfm. Also, if you are on a shared server, isn't there just one missing template handler available to all the sites on the server? (Unless they are running separate instances of CF). So I would think this would preclude you from having your own special missing template handler. -- Josh - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" Sent: Wednesday, November 22, 2006 2:32 PM Subject: Re: cferror on application.cfm not working (?) > Unfortunately no. At least not as far as I know. > > On 11/22/06, Michael E. Carluen <[EMAIL PROTECTED]> wrote: >> Thanks Ray, Will, Jon, >> >> For this app, I am currently using HMS on a shared server. This means I >> do >> not have access to the CF Administrator for setting the .cfm missing >> template handler. And HMS's (control panel) custom error template mgt >> only >> catches .htm missing templates. >> >> Can the missing template handler be programmatically done on >> application.cfm >> or anywhere else? I figure CF finds application.cfm before executing the >> actual requested page. (Pls correct me if I'm wrong.) >> >> Thanks again. >> >> >> > >> > > Michael, >> > > >> > > A template error is thrown before anything else. You'll need to >> > > handle those through your missing template handler - which you can >> > > set in the CFAdmin. >> > > >> > > Jon >> > > >> >> >> > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261529 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror on application.cfm not working (?)
Unfortunately no. At least not as far as I know. On 11/22/06, Michael E. Carluen <[EMAIL PROTECTED]> wrote: > Thanks Ray, Will, Jon, > > For this app, I am currently using HMS on a shared server. This means I do > not have access to the CF Administrator for setting the .cfm missing > template handler. And HMS's (control panel) custom error template mgt only > catches .htm missing templates. > > Can the missing template handler be programmatically done on application.cfm > or anywhere else? I figure CF finds application.cfm before executing the > actual requested page. (Pls correct me if I'm wrong.) > > Thanks again. > > > > > > > Michael, > > > > > > A template error is thrown before anything else. You'll need to > > > handle those through your missing template handler - which you can > > > set in the CFAdmin. > > > > > > Jon > > > > > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261528 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror on application.cfm not working (?)
Thanks Ray, Will, Jon, For this app, I am currently using HMS on a shared server. This means I do not have access to the CF Administrator for setting the .cfm missing template handler. And HMS's (control panel) custom error template mgt only catches .htm missing templates. Can the missing template handler be programmatically done on application.cfm or anywhere else? I figure CF finds application.cfm before executing the actual requested page. (Pls correct me if I'm wrong.) Thanks again. > > > Michael, > > > > A template error is thrown before anything else. You'll need to > > handle those through your missing template handler - which you can > > set in the CFAdmin. > > > > Jon > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261525 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cferror on application.cfm not working (?)
Oops didn't mean to dog pile on that response :-) I see Will and Ray already got it covered... On Nov 22, 2006, at 4:33 PM, Jon Clausen wrote: > Michael, > > A template error is thrown before anything else. You'll need to > handle those through your missing template handler - which you can > set in the CFAdmin. > > Jon > > On Nov 22, 2006, at 3:58 PM, Michael E. Carluen wrote: > >> >> >> On testing it however (by using a .cfm file name that does not >> exists), I >> still see the usual debug page with "Error Occurred While Processing >> Request" message and not the error.cfm. >> ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261522 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror on application.cfm not working (?)
Michael, A template error is thrown before anything else. You'll need to handle those through your missing template handler - which you can set in the CFAdmin. Jon On Nov 22, 2006, at 3:58 PM, Michael E. Carluen wrote: > > > On testing it however (by using a .cfm file name that does not > exists), I > still see the usual debug page with "Error Occurred While Processing > Request" message and not the error.cfm. > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261520 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cferror on application.cfm not working (?)
cferror is for errors that occur within cfm files. To catch a 404 you are going to need to use your web server's error handling or use CF's Missing Template Handler. On 11/22/06, Michael E. Carluen <[EMAIL PROTECTED]> wrote: > Hi everyone. > > > > I am currently adding a basic custom error page on my app with the basic > tags: > > > > > > on the application cfm > > > > On testing it however (by using a .cfm file name that does not exists), I > still see the usual debug page with "Error Occurred While Processing > Request" message and not the error.cfm. > > > > Any suggestions? Thanks in advance. > > > > > > ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261517 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror on application.cfm not working (?)
>On testing it however (by using a .cfm file name that does not exists), I >still see the usual debug page with "Error Occurred While Processing >Request" message and not the error.cfm. You'd need a missing template handler for that type of error. An error request template won't catch it. You'll need to create some type of code error to generate the error. But I'd create an exception handler as well. It'll catch most errors, then the request one kicks in if it doesn't. Will ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261515 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Cferror and the site wide handler
Thanks very much for clearing this up Matt and Dave, I was using type="request". -Original Message- From: Dave Watts Sent: Wednesday, May 10, 2006 6:21 PM To: CF-Talk Subject: RE: Cferror and the site wide handler If I recall correctly, this is the execution order for error handlers: 1. Exception handler (CFTRY/CFCATCH) 2. CFERROR TYPE="EXCEPTION" 3. Site-wide error handler 4. CFERROR TYPE="REQUEST" ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240207 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: Cferror and the site wide handler
On 5/10/06, Plunkett, Matthew wrote: > My problem is that I have both 2 and 3 implemented. It seems that 2 never > hits unless I turn off 3. Is that expected, or is there a way around it? That ain't right. Are you sure you are using type="EXCEPTION" in the cferror statement? Dave Watts put up an order of precedence in another thread and that sounds right. I have been doing error trapping like I described with no problems. EXCEPT... One quirk I noticed recently but have not scouted out yet: If I have a root folder that has an Application.cfm in it, and then I have a subfolder (/foo/), and /foo/Application.cfm also exists AND the first line of /foo/Application.cfm is then the subfolder inherits all of the root folder's stuff just like I expect. EXCEPT for the cferror statement. I found on a CF7 Crystaltech server that I had to duplicate in the cferror statement to bring error handling back. I haven't investigated further. Just needed a band-aid while I worked that day. -- [EMAIL PROTECTED] Janitor, MSB Web Systems mysecretbase.com ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240192 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: Cferror and the site wide handler
> Is it possible to use both cferror and the site wide handler > in MX 6.1? > > My tests indicate that it is not possible, which is > unfortunate. It seems that the site wide will always take > precedence. Is there a way around that? > My guess is no, but thought I'd check anyway. > > I care because as server admins, we wanted to come up with a > default error template that we could throw up easily as a > standard security measure. But then on internal development > servers, allow devs to override the template with one that > gave them more information. Yes, I'm pretty sure that it's possible. However, it will depend on the TYPE attribute you specify with CFERROR. If I recall correctly, this is the execution order for error handlers: 1. Exception handler (CFTRY/CFCATCH) 2. CFERROR TYPE="EXCEPTION" 3. Site-wide error handler 4. CFERROR TYPE="REQUEST" Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240190 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: Cferror and the site wide handler
Catch the errors and send an email to yourself and cfdump all scope sin the email. I have created a custom error handling component that displays a windows style error box with a button that when clicked will display all the useful error information in a hidden div, so while it looks pretty for users, there is still a way to see the error output on the site if you want to. Whether or this is enabled is a simple value I set in an XML file which also has the option to also email all errors to the webmaster. -Original Message- From: Plunkett, Matthew [mailto:[EMAIL PROTECTED] Sent: 10 May 2006 19:45 To: CF-Talk Subject: RE: Cferror and the site wide handler Yes, I know where it is set. Thanks for confirming the order that they are processed. Now we have to find a new way to be secure (by hiding all the junk that default errors reveal), but let the developers see what is going on. Probably we need a smarter, more robust site wide handler. Thanks. -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:42 PM To: CF-Talk Subject: RE: Cferror and the site wide handler No, the site wide error handler is specified in the CF Admin under the Server Settings > Settings section. That will catch any error produced by your site, and the processing will never make it to a page with CFERROR on it. -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:35 PM To: CF-Talk Subject: RE: Cferror and the site wide handler I am a bit confused as to the difference? When I use CFERror, I am using it as a site-wide handler? Then, I can use CFTRY/CFCATCH on individual pages. Are you talking about 404 handlers?? .. Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 212.691.3477 fax www.nylontechnology.com "You know, like nunchuck skills, bowhunting skills, computer hacking skills... Girls only want boyfriends who have great skills." - Napoleon Dynamite ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240181 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: Cferror and the site wide handler
Matt, Thanks for all that information. The article has good stuff in it. My problem is that I have both 2 and 3 implemented. It seems that 2 never hits unless I turn off 3. Is that expected, or is there a way around it? Thanks, Another Matt -Original Message- From: Matt Robertson Sent: Wednesday, May 10, 2006 4:23 PM To: CF-Talk Subject: Re: Cferror and the site wide handler Best way to look at error handling: 1. try/catch blocks are for situations where you have an expected potential error (i.e. a mime type failure on a file upload) and you want to handle this known likely error in a graceful fashion (i.e. "Hey idiot you cannot upload an exe file. Please click here try again."). You typically surround portions of code but not entire templates in try/catch blocks, as you need a try/catch block per template otherwise. 2. The cferror tag, specifically this variant of it: should be used to house your application-wide error handler, which you build. The thing that kicks in to tell you when something has exploded. This can do nearly the same thing as a site-wide handler, or behave in some application-specific fashion. Its all up to you. I put my cferror statement in /Application.cfm. 3. The site-wide error handler bats cleanup in case neither of the above are in place, or they fail for some reason. I wrote a tutorial on doing a SWEH that is easily adapted to a cferror handler. It dumps all data scopes securely to disk, to screen or to email. The dumps are invaluable in problem diagnosis. You can write simple code that dumps error data to screen for a certain range of IPs or logins or whatever so the same handler works for developers or visitors. http://mysecretbase.com/Building_A_ColdFusion_Error_Handler.cfm -- [EMAIL PROTECTED] Janitor, MSB Web Systems mysecretbase.com ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240167 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: Cferror and the site wide handler
Best way to look at error handling: 1. try/catch blocks are for situations where you have an expected potential error (i.e. a mime type failure on a file upload) and you want to handle this known likely error in a graceful fashion (i.e. "Hey idiot you cannot upload an exe file. Please click here try again."). You typically surround portions of code but not entire templates in try/catch blocks, as you need a try/catch block per template otherwise. 2. The cferror tag, specifically this variant of it: should be used to house your application-wide error handler, which you build. The thing that kicks in to tell you when something has exploded. This can do nearly the same thing as a site-wide handler, or behave in some application-specific fashion. Its all up to you. I put my cferror statement in /Application.cfm. 3. The site-wide error handler bats cleanup in case neither of the above are in place, or they fail for some reason. I wrote a tutorial on doing a SWEH that is easily adapted to a cferror handler. It dumps all data scopes securely to disk, to screen or to email. The dumps are invaluable in problem diagnosis. You can write simple code that dumps error data to screen for a certain range of IPs or logins or whatever so the same handler works for developers or visitors. http://mysecretbase.com/Building_A_ColdFusion_Error_Handler.cfm -- [EMAIL PROTECTED] Janitor, MSB Web Systems mysecretbase.com ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240162 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: Cferror and the site wide handler
Thanks, I will look at this details.cfm. -Original Message- From: Steve Brownlee Sent: Wednesday, May 10, 2006 3:01 PM To: CF-Talk Subject: RE: Cferror and the site wide handler Matt, I was responding to Ben there. Didn't intend to oversimplify for you since you obviously knew about it. For the level of detail you need, you'll be rolling you own exception page that you'll need to call for every error in a try-catch block. I've been through the trial of that several times before, and while it is time consuming, it certainly is not difficult and the payoffs are tremendous. For an even more advanced way of hiding secure information in errors that may not be caught correctly, you can modify the error template itself (WEB-INF\exception\detail.cfm). ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240141 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: Cferror and the site wide handler
Matt, I was responding to Ben there. Didn't intend to oversimplify for you since you obviously knew about it. For the level of detail you need, you'll be rolling you own exception page that you'll need to call for every error in a try-catch block. I've been through the trial of that several times before, and while it is time consuming, it certainly is not difficult and the payoffs are tremendous. For an even more advanced way of hiding secure information in errors that may not be caught correctly, you can modify the error template itself (WEB-INF\exception\detail.cfm). -Original Message- From: Plunkett, Matthew [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:45 PM To: CF-Talk Subject: RE: Cferror and the site wide handler Yes, I know where it is set. Thanks for confirming the order that they are processed. Now we have to find a new way to be secure (by hiding all the junk that default errors reveal), but let the developers see what is going on. Probably we need a smarter, more robust site wide handler. Thanks. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240138 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: Cferror and the site wide handler
It's only advantage, IMHO, is ease of deployment. It's certainly not useful for detailed error reporting like Matt needs. -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:50 PM To: CF-Talk Subject: RE: Cferror and the site wide handler Ahhh, gotcha... That would explain my confusion... I have never used the error handler in the Admin. Does it have any advantage to the CFError tag defined on a per-application level? Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 212.691.3477 fax www.nylontechnology.com ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240136 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: Cferror and the site wide handler
Ahhh, gotcha... That would explain my confusion... I have never used the error handler in the Admin. Does it have any advantage to the CFError tag defined on a per-application level? ... Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 212.691.3477 fax www.nylontechnology.com "You know, like nunchuck skills, bowhunting skills, computer hacking skills... Girls only want boyfriends who have great skills." - Napoleon Dynamite -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:42 PM To: CF-Talk Subject: RE: Cferror and the site wide handler No, the site wide error handler is specified in the CF Admin under the Server Settings > Settings section. That will catch any error produced by your site, and the processing will never make it to a page with CFERROR on it. -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:35 PM To: CF-Talk Subject: RE: Cferror and the site wide handler I am a bit confused as to the difference? When I use CFERror, I am using it as a site-wide handler? Then, I can use CFTRY/CFCATCH on individual pages. Are you talking about 404 handlers?? . Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 212.691.3477 fax www.nylontechnology.com "You know, like nunchuck skills, bowhunting skills, computer hacking skills... Girls only want boyfriends who have great skills." - Napoleon Dynamite ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240134 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: Cferror and the site wide handler
Yes, I know where it is set. Thanks for confirming the order that they are processed. Now we have to find a new way to be secure (by hiding all the junk that default errors reveal), but let the developers see what is going on. Probably we need a smarter, more robust site wide handler. Thanks. -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:42 PM To: CF-Talk Subject: RE: Cferror and the site wide handler No, the site wide error handler is specified in the CF Admin under the Server Settings > Settings section. That will catch any error produced by your site, and the processing will never make it to a page with CFERROR on it. -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:35 PM To: CF-Talk Subject: RE: Cferror and the site wide handler I am a bit confused as to the difference? When I use CFERror, I am using it as a site-wide handler? Then, I can use CFTRY/CFCATCH on individual pages. Are you talking about 404 handlers?? . Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 212.691.3477 fax www.nylontechnology.com "You know, like nunchuck skills, bowhunting skills, computer hacking skills... Girls only want boyfriends who have great skills." - Napoleon Dynamite ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240133 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: Cferror and the site wide handler
No, the site wide error handler is specified in the CF Admin under the Server Settings > Settings section. That will catch any error produced by your site, and the processing will never make it to a page with CFERROR on it. -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:35 PM To: CF-Talk Subject: RE: Cferror and the site wide handler I am a bit confused as to the difference? When I use CFERror, I am using it as a site-wide handler? Then, I can use CFTRY/CFCATCH on individual pages. Are you talking about 404 handlers?? Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 212.691.3477 fax www.nylontechnology.com "You know, like nunchuck skills, bowhunting skills, computer hacking skills... Girls only want boyfriends who have great skills." - Napoleon Dynamite ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240129 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: Cferror and the site wide handler
I am a bit confused as to the difference? When I use CFERror, I am using it as a site-wide handler? Then, I can use CFTRY/CFCATCH on individual pages. Are you talking about 404 handlers?? ... Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 212.691.3477 fax www.nylontechnology.com "You know, like nunchuck skills, bowhunting skills, computer hacking skills... Girls only want boyfriends who have great skills." - Napoleon Dynamite -Original Message- From: Plunkett, Matthew [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 2:16 PM To: CF-Talk Subject: Cferror and the site wide handler Is it possible to use both cferror and the site wide handler in MX 6.1? My tests indicate that it is not possible, which is unfortunate. It seems that the site wide will always take precedence. Is there a way around that? My guess is no, but thought I'd check anyway. I care because as server admins, we wanted to come up with a default error template that we could throw up easily as a standard security measure. But then on internal development servers, allow devs to override the template with one that gave them more information. Thanks. ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240128 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: cferror problem
Most likely you have an error in CustomError.cfm. If CF can't call the error template page it gives the error of the original page. Cheers, Sam On 10/14/05, Chad McCue <[EMAIL PROTECTED]> wrote: > > I am running CF7on windows 2003. > > I am trying to use in my application.cfm file and it never calls > my template I give it. > > > here is my call. > type="Exception" exception="Any" > > > > > Here is the error the page has. > > 13:00:28.028 - Expression Exception - in > D:\Inetpub\wwwroot\AgentSite\FunctionPages\AccountFunctions.cfc : line 841 > Element CustomerID is undefined in a CFML structure referenced as part of > an expression. > > > > > > > ~| 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:221007 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: CFError performance
> No, I changed the y = x to y = x/1, of course the x/0 is > still the error condition. But thanks ;-) Oh my misunderstanding ... nevermind... :) s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| 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:212212 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: CFError performance
No, I changed the y = x to y = x/1, of course the x/0 is still the error condition. But thanks ;-) On 7/19/05, S. Isaac Dealey <[EMAIL PROTECTED]> wrote: > > > Thanks for the suggestion. On one of our boxes (without > > robust error > > handling) processing times increase to 8 times with your > > script. I modified > > it so it was still performing a division operation (y=x/1) > > to improve the > > validity of the script. > > Actually that makes the script invalid... As the purpose of x/0 is to > create an error, so that you can determine the time required to raise > the error -- if you change it to x/1 then you're just comparing the > control group against itself and not getting any useful information. > > > s. isaac dealey 954.522.6080 > new epoch : isn't it time for a change? > > add features without fixtures with > the onTap open source framework > > http://www.fusiontap.com > http://coldfusion.sys-con.com/author/4806Dealey.htm > > > > > ~| 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:212210 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: CFError performance
> I got: > normal time = 0 milliseconds > error time = 125 milliseconds > division by zero error! Increase the number of iterations of the loop until normal time is at least 1ms -- 400 is what worked on our server, but it's liable to vary. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| 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:212209 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: CFError performance
> Thanks for the suggestion. On one of our boxes (without > robust error > handling) processing times increase to 8 times with your > script. I modified > it so it was still performing a division operation (y=x/1) > to improve the > validity of the script. Actually that makes the script invalid... As the purpose of x/0 is to create an error, so that you can determine the time required to raise the error -- if you change it to x/1 then you're just comparing the control group against itself and not getting any useful information. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| 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:212208 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: CFError performance
I got: normal time = 0 milliseconds error time = 125 milliseconds division by zero error! -Original Message- From: S.Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: 19 July 2005 15:49 To: CF-Talk Subject: Re: CFError performance Minor revisions to the script: normal time = #ms# milliseconds error time = #ms# milliseconds increase = x#int(m)# I ran this on our development server and got these results: normal time = 15 milliseconds error time = 20813 milliseconds increase = x1387 Although I think we have robust error information enabled on this server -- if robust error info is disabled I don't think the gap is nearly as wide. ~| 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:212205 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: CFError performance
Thanks for the suggestion. On one of our boxes (without robust error handling) processing times increase to 8 times with your script. I modified it so it was still performing a division operation (y=x/1) to improve the validity of the script. I appreciate the ideas. Adam On 7/19/05, S. Isaac Dealey <[EMAIL PROTECTED]> wrote: > > > > > > > > > > normal time = #ms# milliseconds > > > > > > > > > > > error time = #ms# milliseconds > > > > increase = x#int(m)# ~| 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:212203 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: CFError performance
Minor revisions to the script: normal time = #ms# milliseconds error time = #ms# milliseconds increase = x#int(m)# I ran this on our development server and got these results: normal time = 15 milliseconds error time = 20813 milliseconds increase = x1387 Although I think we have robust error information enabled on this server -- if robust error info is disabled I don't think the gap is nearly as wide. ~| 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:212198 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: CFError performance
> It may have been a crazy dream but I thought I read > somewhere that when CF > enters an error state the performance of the server, or > more importantly > it's ability to serve pages, is impeded. Does anyone have > any thoughts or > links to any evidence to that effect? Specifically, we > have some errors > generated when spiders hit our sites and incorrectly > reassemble SES urls, > for example /index.cfm/abc/123/etc.cfm. I know we can do > some clever stuff > but we are discussing the implications of removins SES > urls from our > applications altogether and I know our sysadmin would play > hell if I could > show him that the box is on it's knees when it moves into > an error state. > This would win the war against the marketing guys who like > to sell SES urls. > Thanks in advance, > Adam Howitt I wouldn't imagine it would be terribly difficult to test the theory... normal time = #ms# milliseconds error time = #ms# milliseconds I don't know if I'd describe it as "on its knees" but raising an error definately does require a few extra cycles... This is a pretty crude test tho -- if you really wanted to know the genuine impact, you'd set a load-testing tool like the MS web stress analyser against the application. s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| 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:212195 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: cferror question
Darn. You can use cftry/catch, with a catch type of missinginclude, but this requires cftry/catch on the page, and can't be implemented globally (it's intended for fine-grain exception handling) Chris Norloff -- Original Message -- From: Will Tomlinson <[EMAIL PROTECTED]> Reply-To: cf-talk@houseoffusion.com Date: Wed, 30 Mar 2005 21:33:13 -0400 >>Did you set the missing template handler within the CF Administrator? > > >I'm using Shared Hosting - No access. > >Thanks, >Will > > ~| 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:200956 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: cferror question
You can use the Missing Template Handler in CFMX Admin. Chris -- Original Message -- From: Will Tomlinson <[EMAIL PROTECTED]> Reply-To: cf-talk@houseoffusion.com Date: Wed, 30 Mar 2005 20:40:29 -0400 >cferror DEFINITELY will not catch missing file errors. I just had that one >happen on my site, still trying to figure out a way around it. :) > >Will > > ~| 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:200955 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: cferror question
Is that site still at ct? If so call (in best south park voice) Timma and see if they will let you add a custom error page, which I could be wrong about but I think is possible. From: Will Tomlinson <[EMAIL PROTECTED]> Sent: Wednesday, March 30, 2005 9:36 PM To: CF-Talk Subject: Re: cferror question >Did you set the missing template handler within the CF Administrator? I'm using Shared Hosting - No access. Thanks, Will ~| 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:200888 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: cferror question
>Did you set the missing template handler within the CF Administrator? I'm using Shared Hosting - No access. Thanks, Will ~| 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:200879 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: cferror question
> cferror DEFINITELY will not catch missing file errors. I just > had that one happen on my site, still trying to figure out a > way around it. :) Did you set the missing template handler within the CF Administrator? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| 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:200878 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: cferror issue
I tried and cferror caught it without fail. Perhaps something wrong in your error template causing it to fail? Ken On Mon, 24 Jan 2005 16:43:42 -0400, Robert Everland III <[EMAIL PROTECTED]> wrote: > Why does cferror exception not catch an error like this > , it will just throw the error without being caught by cferror. > > Bob > > ~| 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:193025 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: cferror issue
On Mon, 24 Jan 2005 16:43:42 -0400, Robert Everland III <[EMAIL PROTECTED]> wrote: > Why does cferror exception not catch an error like this > , it will just throw the error without being caught by cferror. > Because the CF engine doesn't even get as far as compiling the page. If the page isn't compiled correctly, then no user-defined error trapping will be processed. The syntax error stops the CF compiler dead in its tracks. Regards, Dave. ~| Logware: 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:191586 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: cferror question
Hi Chris I can see that when you dump out cferror, the thrown exception is stated in the structure, my problem lies in that I can't seem to get Cold Fusion to go to the correct template... The two scenarios are below and it goes against what my thinking was... - SCENARIO ONE TEMPLATE - SCENARIO ONE RESULT Invokes cferror_comwhatevervalidation.cfm This appears correct as the custom exception is handled by the correct cferror tag - SCENARIO TWO TEMPLATE - SCENARIO TWO RESULT Invokes cferror_comwhatevervalidation.cfm Should this not invole the cferror_comwhatever.cfm? This is what I don't understand Is this not the way to do it? For info, if I change the order of the cferror, it just uses the last one rather than specifically the one stated in the type for cfthrow. Hope that makes sense. Thanks for any help. -- dc ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186822 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: cferror question
Looks okay to me. The next thing I'd do is put in the exception handling template to see the cferror scope variables - maybe something's not exactly as you expect (and you might check the cfcatch scope, too). Chris Norloff -- Original Message -- From: David Collie <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Thu, 9 Dec 2004 13:18:52 + >Hi all > >I can't get this to work and I've tried livedocs but I don't see >anything that says that I shouldn't be able to do this > > >template="error_comwhatever.cfm"> >template="error_comwhatever.cfm"> > > > > > > > > > >When I change the order of the cferror's and cfthrow's, it just seems >to default to the last cferror tag regardless. >I can get the CF exceptions (database, missinginclude, etc) to work >no bother just throwing them in the template but not the custom >ones... > >Note that I can get the custom exceptions to work when wrapped in >cftry/cfcatch but can you not use a custom cfthrow outwith the >cftry/cfcatch and trap it with cferror? > >Any pointers appreciated. Am I totally on the wrong track? > >-- >dc > > ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186814 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: CFError bummer
Yeah, that is along the lines of what I was going to try next. Thanks. -- Marlon Moyer, Sr. Internet Developer American Contractors Insurance Group phone: 972.687.9445 fax: 972.687.0607 mailto:[EMAIL PROTECTED] www.acig.com > -Original Message- > From: Barney Boisvert [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 10, 2004 12:15 PM > To: CF-Talk > Subject: RE: CFError bummer > > I use a single CFERROR template which then does a CFSWITCH on > #error.rootcause.type# to pick the actual type of the exception, and then > process accordingly (redirect, email, just error to screen, log, > whatever). > > The 'rootcause' in there goes inside the CFErrorWrapper to the original > exception. I don't know how to do it directly in the CFERROR tag, but > I've > not run across any downside to doing it this way. I'd actually even call > it > a benefit, because then all your exception hanlding goes through a single > template, rather than multiple templates. > > Cheers, > barneyb > > > -Original Message- > > From: Marlon Moyer [mailto:[EMAIL PROTECTED] > > Sent: Thursday, June 10, 2004 8:43 AM > > To: CF-Talk > > Subject: CFError bummer > > > > I had this great idea for my web apps. Anytime I needed to > > have a user > > authenticated, I'd check to see if the > > session.is_authenticated variable > > was set and if not, I'd throw a custom error type of > > "notLoggedIn". In > > my application.cfm file I'd have a cferror tag that would trap this > > error and send it to the login form. Then I found out it won't work. > > When you throw a custom error tag, CF puts it inside a > > coldfusion.runtime.CfErrorWrapper error type. This would > > still work if > > I also didn't want to trap notAuthorized errors, etc. also. > > > > > > > > Is there a way to trap the error inside the CFErrorWrapper object? > > > > > > > > -- > > > > Marlon Moyer, Sr. Internet Developer > > > > American Contractors Insurance Group > > > > phone: 972.687.9445 > > > > fax: 972.687.0607 > > > > mailto:[EMAIL PROTECTED] > > > > www.acig.com > > > > > > > > > > > > > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: CFError bummer
Have you tried examining the CFERROR struct that is returned for the error type and then conditionally cflocating the user to the login page, if it's a "notLoggedIn" error and running a if it's not? Jeff - Original Message - From: Marlon Moyer To: CF-Talk Sent: Thursday, June 10, 2004 8:42 AM Subject: CFError bummer I had this great idea for my web apps. Anytime I needed to have a user authenticated, I'd check to see if the session.is_authenticated variable was set and if not, I'd throw a custom error type of "notLoggedIn". In my application.cfm file I'd have a cferror tag that would trap this error and send it to the login form. Then I found out it won't work. When you throw a custom error tag, CF puts it inside a coldfusion.runtime.CfErrorWrapper error type. This would still work if I also didn't want to trap notAuthorized errors, etc. also. Is there a way to trap the error inside the CFErrorWrapper object? -- Marlon Moyer, Sr. Internet Developer American Contractors Insurance Group phone: 972.687.9445 fax: 972.687.0607 mailto:[EMAIL PROTECTED] www.acig.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFError bummer
I use a single CFERROR template which then does a CFSWITCH on #error.rootcause.type# to pick the actual type of the exception, and then process accordingly (redirect, email, just error to screen, log, whatever). The 'rootcause' in there goes inside the CFErrorWrapper to the original exception. I don't know how to do it directly in the CFERROR tag, but I've not run across any downside to doing it this way. I'd actually even call it a benefit, because then all your exception hanlding goes through a single template, rather than multiple templates. Cheers, barneyb > -Original Message- > From: Marlon Moyer [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 10, 2004 8:43 AM > To: CF-Talk > Subject: CFError bummer > > I had this great idea for my web apps. Anytime I needed to > have a user > authenticated, I'd check to see if the > session.is_authenticated variable > was set and if not, I'd throw a custom error type of > "notLoggedIn". In > my application.cfm file I'd have a cferror tag that would trap this > error and send it to the login form. Then I found out it won't work. > When you throw a custom error tag, CF puts it inside a > coldfusion.runtime.CfErrorWrapper error type. This would > still work if > I also didn't want to trap notAuthorized errors, etc. also. > > > > Is there a way to trap the error inside the CFErrorWrapper object? > > > > -- > > Marlon Moyer, Sr. Internet Developer > > American Contractors Insurance Group > > phone: 972.687.9445 > > fax: 972.687.0607 > > mailto:[EMAIL PROTECTED] > > www.acig.com > > > > > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: cferror causing me pain
> This is 100% opinion, but CFERROR should be a last ditch effort to make sure > no error messages appear on the screen. You should always use one, but all > your actual error trapping should be done with CFTRY..CFCATCH if at all > possible. This goes against the whole idea of how exception handling should be structured in an application. For a diagrammed explanation of the three "tiers" of structured exception handling, see page 430 of The ColdFusion MX Bible. If you don't have a copy, here's an explanation that might help. Envision a framework that has three layers... The top layer contains one or more sieves that CFCATCH exceptions thrown by your application. Each sieve catches a specific type of exception (type="Database", type="_expression_", etc) that you expect might reasonably occur in your application, such as a unique index violation on an alternate key column that would be thrown by the database if someone tried to register twice using the same email address. This is a fairly coarse test, so you would further test inside the CFCATCH construct for the NativeErrorCode that applies to the specific type="Database" exception you want to handle. If the exception is the one you want to handle in an "exceptional" manner, the code inside your CFCATCH type="Database" construct would take over and handle it. If it was some other type="Database" exception, you would CFRETHROW the exception you "caught" back out of the top layer, down to the second layer in the exception handling framework. If an exception isn't handled by the top layer of CFCATCH constructs -- either by not having a CFCATCH of the type that was thrown, or by catching and then RETHROWing the exception -- then it becomes a bona fide "error." I know that exceptions and errors are thought of as the same thing, but it sometimes helps to conceptually separate them in your mind this way, where exceptions result in handling the flow of work in some "exceptional" manner (not just displaying a more friendly error message), and errors are exceptions that stop the flow of work because there is no exceptional process to follow when them occur. One indication that your exception handling "top layer" might be doing the wrong job is if more often than not you specify type="Any" or altogether omit the type attribute from CFCATCH. If you are doing this most of the time then you're probably using CFTRY to improperly perform CFERROR's job, which is the second layer in the exception handling framework. The second layer contains one or more sieves that handle errors. Each sieve corresponds to a specific error handler -- either an error handling template installed via CFERROR or a CFCASE construct that tests for exception type inside a multi-use error handling template -- and typically logs the error, displays a friendly error message, and possibly emails the developer. If an error handler for the specific type of error thrown wasn't installed via CFERROR, then that error falls through to the site-wide error handler, which is the third layer of the exception handling framework, and is more like a solid-bottomed catch basin in this metaphor. I refer to these as "crashes" because they should typically have been handled by an error handler, and often suggests a more serious problem. Setting up a structured exception handling framework like this enables you to really leverage ColdFusion's exception handling capabilities. Take for example the guy who tries to register twice on your website. Are you first SELECTing from the user table based on his email address, checking the RecordCount, and then conditionally INSERTing only if RecordCount EQ 0? With properly structured exception handling, you simply attempt the INSERT inside a CFTRY with a CFCATCH type="Database" that further tests CFCATCH.NativeErrorCode for a value of 2601 (unique index violation on SQL Server), then re-route the user to a page that not only describes exactly what's going on, but also gives him an interface for emailing his password to himself. An "exceptional" process flow for a specifically-handled exception. Another benefit is that you can use CFTHROW to nicely integrate your own business logic into the same exception handling mechanism used by ColdFusion's own exceptions. If your business rules define certain anomalies as exceptions, even if those anomalies don't throw exceptions in ColdFusion, you can throw a custom exception via CFTHROW and let your structured exception handling framework kick in and do whatever is necessary. Using dot notation in the values of your type attributes (type="BusinessRules.Inventory.UnderLimit") enables you to do some pretty fancy things, but that's another discussion altogether. We spend a good bit of time teaching proper structured exception handling in our ColdFusion MX Master Class because it really does make applications easier to design, build, and maintain, and you don't end up writing unnecessary and burdensome database queries a
RE: cferror causing me pain
> This is 100% opinion, but CFERROR should be a last ditch > effort to make sure no error messages appear on the screen. > You should always use one, but all your actual error trapping > should be done with CFTRY..CFCATCH if at all possible. I would strongly disagree with this (not that my opinion is any better than yours!) I run into a lot of people using CFTRY/CFCATCH around their entire page, and I think it's a waste. I'd strongly recommend reserving the use of CFTRY and CFCATCH for situations where you have an expected problem with a specific algorithm, and a specific solution for that problem. > If you're using something like Fusebox or Mach-ii, it's a > snap, because everything goes through a single template (index.cfm) > before being delegated to one of the various request handlers. > Just put your CFTRY..CFCATCH in there. If you've got a "normal" > app, where each page is it's own template, then you're kind of > stuck, unfortunately, although you can come close to duplicating > by doing something like this in every template: > > > > > > > > > Then in "errordispatcher.cfm" you can use the CFCATCH > variables to determine what to do (different error types), and > you still have full access to all the CF tags you could ever > want. You have full access to all CF tags using CFERROR TYPE="EXCEPTION", CFERROR TYPE="MONITOR", and the site-wide error handler. Given that, what's the advantage to using CFTRY in this case? > That won't handle 404s and such, so in your actual CFERROR > template, I usually use a client-side redirect to forward back > to my application, to an error page, so I can once again use > all the CF tags. You need to be careful with that page though, > because you could end up in an infinite loop. It HAS to be > defined, and it should only use CF, no external resources at > all (DB, web services, network shares, etc), because that might > be the base cause of the error. In general, I'd agree with this part - your CF error handlers have to be careful not to trigger an error. However, if you use the site-wide error handler, or CFERROR TYPE="EXCEPTION", and your error handling page has an error, it won't trigger an infinite loop, but will instead throw to the built-in CF error handler and you'll get the big white error page we all know and love. However, if you do the redirect that you're talking about, you may well get in an infinite loop. > Bottom line, the CFERROR templates should be as dumb as > possible, becase, as you've seen, they are so devoid of > function to be almost worthless. This used to be true, but I don't think it is true at all any more. I find CFERROR and the site-wide error handler to be immensely useful. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: cferror causing me pain
> I'm trying to implement some site-wide error handling using > cferror, and it's really being a PITA. > > In my application.cfm file, at the very end, I have: > > > > > error.cfm and 404.cfm are both in /error/, I have verified > this. After I made this change, I restarted services and then > loaded a test page with an error in it. Instead, I got the > standard exception error handling page (not my page). After > about 30 minutes of screwing around, I went into CFAdmin and > registered /error/error.cfm as the default error handler, and > lo and behold, it worked. I then went in and removed that > setting from CFAdmin and it still worked. Has anyone else seen > this behavior? No, I haven't seen that specific behavior. I have seen all sorts of odd behavior that was only resolved after restarting the CF service, oddly enough. It's worth pointing out that CFERROR TYPE="EXCEPTION" won't catch every possible error, only things that CF considers to be runtime exceptions. I assume that you have a directory called "error" in your web root, and that you have the root slash "/" mapped in CF to your web root, or that you have a CF mapping called "/error" pointing to your error directory? If I recall correctly, the CFERROR tags resolve their paths the same way that CFINCLUDE and CFMODULE do. > Second problem is the request error page, /error/404.cfm > That page is being loaded as expected when I force a request > error, but I cannot for the life of me get the error variables > to display as they should. It is my understanding from > http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p2 > 4.htm#wp2022557 that I can display a number of variables, but > cannot otherwise use any CF tags. That is also my understanding, and has been my experience. I've never had an error page with a name that consists of a number; perhaps that's the problem. (This is purely a shot in the dark.) Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: cferror causing me pain
This is 100% opinion, but CFERROR should be a last ditch effort to make sure no error messages appear on the screen. You should always use one, but all your actual error trapping should be done with CFTRY..CFCATCH if at all possible. If you're using something like Fusebox or Mach-ii, it's a snap, because everything goes through a single template (index.cfm) before being delegated to one of the various request handlers. Just put your CFTRY..CFCATCH in there. If you've got a "normal" app, where each page is it's own template, then you're kind of stuck, unfortunately, although you can come close to duplicating by doing something like this in every template: Then in "errordispatcher.cfm" you can use the CFCATCH variables to determine what to do (different error types), and you still have full access to all the CF tags you could ever want. That won't handle 404s and such, so in your actual CFERROR template, I usually use a client-side redirect to forward back to my application, to an error page, so I can once again use all the CF tags. You need to be careful with that page though, because you could end up in an infinite loop. It HAS to be defined, and it should only use CF, no external resources at all (DB, web services, network shares, etc), because that might be the base cause of the error. Bottom line, the CFERROR templates should be as dumb as possible, becase, as you've seen, they are so devoid of function to be almost worthless. Cheers, barneyb > -Original Message- > From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 10, 2003 11:11 AM > To: CF-Talk > Subject: cferror causing me pain > > CF MX 6.1/Windows XP > > I'm trying to implement some site-wide error handling using > cferror, and > it's really being a PITA. > > In my application.cfm file, at the very end, I have: > > > > > error.cfm and 404.cfm are both in /error/, I have verified > this. After > I made this change, I restarted services and then loaded a test page > with an error in it. Instead, I got the standard exception error > handling page (not my page). After about 30 minutes of > screwing around, > I went into CFAdmin and registered /error/error.cfm as the > default error > handler, and lo and behold, it worked. I then went in and > removed that > setting from CFAdmin and it still worked. Has anyone else seen this > behavior? > > Second problem is the request error page, /error/404.cfm > That page is > being loaded as expected when I force a request error, but I > cannot for > the life of me get the error variables to display as they > should. It is > my understanding from > http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p2 > 4.htm#wp2022557 > that I can display a number of variables, but cannot > otherwise use any > CF tags. Well, here is /error/404.cfm, and it doesn't > display the value > for error.browser (it displays #error.browser# like it's expecting a > cfoutput tag): > > > > > Untitled > > > 404 > #error.browser# > > > > > When I do put #error.browser# inside cfoutput tags, it throws > an error. > > What am I doing wrong? All I want to be able to do is display a form > that will allow the end user to submit feedback, and part of > that form > will be these error variables in hidden form fields. > > Thanks, > > Pete > > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: CFERROR
> > Is your error page in the same directory as your > > Application.cfm file? > > Yes, it is. You might try creating a new directory, copying your error page to it, and creating a new Application.cfm with a CFERROR tag, and a page with an error, within that directory, just to see if you can get it to work outside of your larger application. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| 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 Get the mailserver that powers this list at http://www.coolfusion.com
RE: CFERROR
Yes, it is. Dave -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Sunday, September 14, 2003 4:45 PM To: CF-Talk Subject: RE: CFERROR > I have setup my application.cfm, with a type of > REQUEST that calls a local CF page. For some reason, when > a syntax error occurs, the tag does not get called, and > the standard error code shows. Any Ideas? I have included > the code. Well, first of all, there's no such variable as Error.message. You probably mean to use Error.Diagnostics instead. I tested your code on CFMX 6.1 and CF 5, and it simply failed to resolve Error.message in both cases, though, so that's probably not the only thing causing your problem. Is your error page in the same directory as your Application.cfm file? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| 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
RE: CFERROR
> I have setup my application.cfm, with a type of > REQUEST that calls a local CF page. For some reason, when > a syntax error occurs, the tag does not get called, and > the standard error code shows. Any Ideas? I have included > the code. Well, first of all, there's no such variable as Error.message. You probably mean to use Error.Diagnostics instead. I tested your code on CFMX 6.1 and CF 5, and it simply failed to resolve Error.message in both cases, though, so that's probably not the only thing causing your problem. Is your error page in the same directory as your Application.cfm file? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| 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
Re: RE: CFERROR
Use type="exception" - Original Message - From: Dave Sueltenfuss <[EMAIL PROTECTED]> Date: Friday, September 12, 2003 9:01 am Subject: RE: CFERROR > No, there is no error page defined in the CFAdmin. > > Dave > > > -Original Message- > From: Pascal Peters [EMAIL PROTECTED] > Sent: Friday, September 12, 2003 11:01 AM > To: CF-Talk > Subject: RE: CFERROR > > > Type request is only called if no other handler catches the error. In > your case, you probably have an error page defined in the > administrator. > > -Oorspronkelijk bericht- > Van: Dave Sueltenfuss [EMAIL PROTECTED] > Verzonden: vr 12/09/2003 15:48 > Aan: CF-Talk > CC: > Onderwerp: CFERROR > > > > I have setup my application.cfm, with a type of > REQUEST that > calls a local CF page. For some reason, when a syntax error > occurs, the > tag does not get called, and the standard error code shows. Any > Ideas? I > have included the code. > > Code within application.cfm > > > > > > > ~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: CFERROR
No, there is no error page defined in the CFAdmin. Dave -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 11:01 AM To: CF-Talk Subject: RE: CFERROR Type request is only called if no other handler catches the error. In your case, you probably have an error page defined in the administrator. -Oorspronkelijk bericht- Van: Dave Sueltenfuss [mailto:[EMAIL PROTECTED] Verzonden: vr 12/09/2003 15:48 Aan: CF-Talk CC: Onderwerp: CFERROR I have setup my application.cfm, with a type of REQUEST that calls a local CF page. For some reason, when a syntax error occurs, the tag does not get called, and the standard error code shows. Any Ideas? I have included the code. Code within application.cfm ~| 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
RE: CFERROR
Type request is only called if no other handler catches the error. In your case, you probably have an error page defined in the administrator. -Oorspronkelijk bericht- Van: Dave Sueltenfuss [mailto:[EMAIL PROTECTED] Verzonden: vr 12/09/2003 15:48 Aan: CF-Talk CC: Onderwerp: CFERROR I have setup my application.cfm, with a type of REQUEST that calls a local CF page. For some reason, when a syntax error occurs, the tag does not get called, and the standard error code shows. Any Ideas? I have included the code. Code within application.cfm ~| 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: cferror oddities (revisited)
I realized I have a typo in my original message which may have made my question misleading: "...form users on macs." was meant to be "...from users on macs". What we are experiencing is not targetted just to form submissions, but just regualr template calling as well. Scott -Original Message- From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2003 10:22 AM To: CF-Talk Subject: Re: cferror oddities (revisited) I believe that when you submit a form on a mac it often sends at least one white space even from an 'empty' field. fix: trim() all form input. (a nuisance) I have also had trouble in macs when you have a form with ENCTYPE="MULTIPART/FORM-DATA" which you need in forms with a > I posted a week or so ago, and have yet to be able to find an answer > on various messageboards, etc. > > It seems on an application we are currently testing, the cferror > template is giving "false positives" form users on macs. I.E. - We > run through a use scenario on a pc, everything works fine, and no > error emails get sent to the administrator. We run through the same > scenario on a mac, everything works fine, but we receive a couple of > error emails to the administrator. The errors are all in reference to > undefined variables, and all show the query string variable as null. > It's odd since the application works fine and never shows the custom > error page, but these emails get generated anyway. The app is a > fusebox app. > > Any ideas? > > Thanks, > Scott > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror oddities (revisited)
I believe that when you submit a form on a mac it often sends at least one white space even from an 'empty' field. fix: trim() all form input. (a nuisance) I have also had trouble in macs when you have a form with ENCTYPE="MULTIPART/FORM-DATA" which you need in forms with a > I posted a week or so ago, and have yet to be able to find an answer on > various messageboards, etc. > > It seems on an application we are currently testing, the cferror > template is giving "false positives" form users on macs. I.E. - We run > through a use scenario on a pc, everything works fine, and no error > emails get sent to the administrator. We run through the same scenario > on a mac, everything works fine, but we receive a couple of error emails > to the administrator. The errors are all in reference to undefined > variables, and all show the query string variable as null. It's odd > since the application works fine and never shows the custom error page, > but these emails get generated anyway. The app is a fusebox app. > > Any ideas? > > Thanks, > Scott > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror oddities (revisited)
ie on the MAC sucks IMHO.. It addeds padded spaces and breaks when isn't the last element WG -Original Message- From: Scott Mulholland [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:34 To: CF-Talk Subject: cferror oddities (revisited) I posted a week or so ago, and have yet to be able to find an answer on various messageboards, etc. It seems on an application we are currently testing, the cferror template is giving "false positives" form users on macs. I.E. - We run through a use scenario on a pc, everything works fine, and no error emails get sent to the administrator. We run through the same scenario on a mac, everything works fine, but we receive a couple of error emails to the administrator. The errors are all in reference to undefined variables, and all show the query string variable as null. It's odd since the application works fine and never shows the custom error page, but these emails get generated anyway. The app is a fusebox app. Any ideas? Thanks, Scott ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror oddness?
Right, I was a bit misleading in my wording, some of the templates there is really only one way to proceed, so pasting in the referrer and following the next step off the page does not replicate the error. We are not using any GET forms. The empty query string is what is bothering me. -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 3:54 PM To: CF-Talk Subject: RE: cferror oddness? The referer is the page before where the error happened, so whether or not the variables exist on that page is irrelevant. That's just listed so you can figure out what page the user made the request that caused the error from. The query string should never be empty if you've got a fusebox app, so I suspect that your links are getting botched somehow. Perhaps a GET form where you're putting the fuseaction in the FORM tag's ACTION attribute, rather than a hidden field? HTH, barneyb --- Barney Boisvert, Senior Development Engineer AudienceCentral (formerly PIER System, Inc.) [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -Original Message- > From: Scott Mulholland [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 27, 2003 1:18 PM > To: CF-Talk > Subject: cferror oddness? > > > A cferror tag I put in a new application seems to be randomly emailing > me errors. When I go to the referrer listed in the template the page > in question works fine, and checking the cf logs show no errors. I am > noticing that all the errors have to do with undefined variables, > which you can clearly see in the url of the referrer, but yet the > query string attribute in the error scope comes through as null. Has > anyone seen this before? It's a fusebox app. > > Scott > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror oddness?
The referer is the page before where the error happened, so whether or not the variables exist on that page is irrelevant. That's just listed so you can figure out what page the user made the request that caused the error from. The query string should never be empty if you've got a fusebox app, so I suspect that your links are getting botched somehow. Perhaps a GET form where you're putting the fuseaction in the FORM tag's ACTION attribute, rather than a hidden field? HTH, barneyb --- Barney Boisvert, Senior Development Engineer AudienceCentral (formerly PIER System, Inc.) [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -Original Message- > From: Scott Mulholland [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 27, 2003 1:18 PM > To: CF-Talk > Subject: cferror oddness? > > > A cferror tag I put in a new application seems to be randomly emailing > me errors. When I go to the referrer listed in the template the page in > question works fine, and checking the cf logs show no errors. I am > noticing that all the errors have to do with undefined variables, which > you can clearly see in the url of the referrer, but yet the query string > attribute in the error scope comes through as null. Has anyone seen > this before? It's a fusebox app. > > Scott > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror
On Wednesday 12 Feb 2003 17:30 pm, Kevin Langevin wrote: > (and saved me from more concussions from beating my head against a wall) My wall already has a big dent... I think I should buy some padding... ;-) > that ANY error in the error template causes CF to default back to the > default error handler template. Like, for instance, leaving out the required from from a cfmail tag :-) Bah. -- Tom C Don't take the blood from the Earths veins, To fuel your cars to feed their planes. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror
CFML works on CFERROR templates in CF5, as well, as long as the type="Exception". I just built a whole web-based defect tracking system that uses the template specified in the CFERROR tage as the bug submission form, and I'm using all kinds of CFML on that page. What DOESN'T run is the application.cfm file, so you have to move anything you would have defined in the application.cfm page to the error template itself. Also keep in mind, as Dave Watts pointed out last week in a similar thread (and saved me from more concussions from beating my head against a wall) that ANY error in the error template causes CF to default back to the default error handler template. So...it's a good idea to limit the CFML you use on the error template, but if you have to, test and test and test it. It's gotta be perfect or you'll be seeing the default all the time. -Kevin -Original Message- From: Thomas Chiverton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 12:17 PM To: CF-Talk Subject: Re: cferror On Wednesday 12 Feb 2003 12:47 pm, Craig Dudley wrote: > The template specified in CANNOT run cfml, any cfml at all, > not even a cfif. This is not the case for TYPE="Exception" on MX. See the URL quoted. -- Tom C Listen to Ivanova's suggestions. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror
On Wednesday 12 Feb 2003 12:47 pm, Craig Dudley wrote: > The template specified in CANNOT run cfml, any cfml at all, > not even a cfif. This is not the case for TYPE="Exception" on MX. See the URL quoted. -- Tom C Listen to Ivanova's suggestions. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror
> The template specified in CANNOT run cfml, any cfml at all, > not even a cfif. *Buzz!* Thank you for playing. That is only true for Error Type REQUEST. I use an error template that e-mails me every EXCEPTION. I use CFMAIL, CFDUMP, CFLOOP and several other CFML tags on that template. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror
The cfmail tag should have the parameter "server" instead of "mailserver" Chip -Original Message- From: Thomas Chiverton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 11:23 AM To: CF-Talk Subject: Re: cferror On Tuesday 11 Feb 2003 15:28 pm, Scott Brady wrote: > Most likely, there's a problem in your cfmail code (or something else > on your error page, but I'm guessing that it's the cfmail code). > Maybe post your cfmail code and someone will spot the problem? help ! -- Tom C 'Duct tape is like the force. It has a light side, and a dark side, and it holds the universe together ...' - Carl Zwanzig ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror
The template specified in CANNOT run cfml, any cfml at all, not even a cfif. That's your problem. -Original Message- From: Thomas Chiverton [mailto:[EMAIL PROTECTED]] Sent: 12 February 2003 10:21 To: CF-Talk Subject: Re: cferror On Tuesday 11 Feb 2003 17:44 pm, Thomas Chiverton wrote: > On Tuesday 11 Feb 2003 15:32 pm, Mosh Teitelbaum wrote: > > 2. Debug your CFMAIL code/settings based on the gray-box CF error > > that is currently being shown. > > They gray-box error is just the one that caused the exception (I'm > deliberatly breaking a database call) though. > > I'll try your suggestion. Nope, it no goes stright to the fatal error page, and only logs the one exception in exception.log. We're running on J2EE, updater beta 3 if that helps any. -- Tom C For the last time Hal, open the bloody pod bay door! ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror
On Tuesday 11 Feb 2003 17:44 pm, Thomas Chiverton wrote: > On Tuesday 11 Feb 2003 15:32 pm, Mosh Teitelbaum wrote: > > 2. Debug your CFMAIL code/settings based on the gray-box CF error that is > > currently being shown. > > They gray-box error is just the one that caused the exception (I'm > deliberatly breaking a database call) though. > > I'll try your suggestion. Nope, it no goes stright to the fatal error page, and only logs the one exception in exception.log. We're running on J2EE, updater beta 3 if that helps any. -- Tom C For the last time Hal, open the bloody pod bay door! ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror
On Tuesday 11 Feb 2003 15:32 pm, Mosh Teitelbaum wrote: > 2. Debug your CFMAIL code/settings based on the gray-box CF error that is > currently being shown. They gray-box error is just the one that caused the exception (I'm deliberatly breaking a database call) though. I'll try your suggestion. -- Tom C Honor without money is just a disease. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror
Tom: There may well be an error in your CFMAIL code or settings. When an error is generated inside of a CFERROR error handler, an error is thrown that cannot be caught with TYPE="Exception." It can only be caught by TYPE="Request" which does not allow the use of CFML. So you should do two things: 1. Change your Application.cfm to look like: 2. Debug your CFMAIL code/settings based on the gray-box CF error that is currently being shown. -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -Original Message- > From: Thomas Chiverton [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 10:18 AM > To: CF-Talk > Subject: cferror > > > I'm reading > http://livedocs.macromedia.com/cfmxdocs/Developing_ColdFusion_MX_A > pplications_with_CFML/Errors6.jsp#1126158 > with regards to placing a site wide handler in Application.cfm. > To this end, I've got >template="error.cfm" > mailTo="[EMAIL PROTECTED]" > > > after the cfapplication tag. > > This all works fine, till I use cfmail in the error page, then I > get just the > normal coldfusion gray error box on the page, and no email sent. > > What up ? > The page clearly says that type="Exception" will allow you to use > all CFML > tags etc. > > -- > Tom C > > Don't do what people tell you to do, trust your heart. > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror
On Tuesday 11 Feb 2003 15:28 pm, Scott Brady wrote: > Most likely, there's a problem in your cfmail code (or something else on > your error page, but I'm guessing that it's the cfmail code). Maybe post > your cfmail code and someone will spot the problem? help ! -- Tom C 'Duct tape is like the force. It has a light side, and a dark side, and it holds the universe together ...' - Carl Zwanzig ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror
From: Thomas Chiverton <[EMAIL PROTECTED]> >To this end, I've got > template="error.cfm" > mailTo="[EMAIL PROTECTED]" > > >after the cfapplication tag. > >This all works fine, till I use cfmail in the error page, then I get just the >normal coldfusion gray error box on the page, and no email sent. Most likely, there's a problem in your cfmail code (or something else on your error page, but I'm guessing that it's the cfmail code). Maybe post your cfmail code and someone will spot the problem? Scott Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror
Is it possible that you have an exception on the handler page? D. Thomas Chiverton wrote: > I'm reading > >http://livedocs.macromedia.com/cfmxdocs/Developing_ColdFusion_MX_Applications_with_CFML/Errors6.jsp#1126158 > with regards to placing a site wide handler in Application.cfm. > To this end, I've got >template="error.cfm" > mailTo="[EMAIL PROTECTED]" > > > after the cfapplication tag. > > This all works fine, till I use cfmail in the error page, then I get just the > normal coldfusion gray error box on the page, and no email sent. > > What up ? > The page clearly says that type="Exception" will allow you to use all CFML > tags etc. > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror
Tim: The two should be mutually exclusive as the JS alert is client-side and CFERROR only traps errors that occur within ColdFusion (i.e., server-side). When you say that a JS alert is encountered, do you mean that the JS dialog box pops-up or do you mean whenever you have the alert code in a CFM file? Also, what kind of exception is being thrown? What other information is available from the Exception? Is it possible that some other code, somewhere around the JS code, is causing the exception? -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -Original Message- > From: Tim Do [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 06, 2003 11:06 AM > To: CF-Talk > Subject: cferror > > > Hello all, > > Anybody know why cferror is thinking a javascript alert is an > error? I use > js alerts in several areas of my application and it worked fine > before I put > in the cferror. Now everytime a js alert is encountered, I get the error > page. > > This is what I have for my cferror code: > > mailto="[EMAIL PROTECTED]"> > > and here is my js code: > > > alert('Sorry...\The APN Number you entered does not exists, Please > Try again.'); > window.history.go(-1); > > > > Thanks > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cferror
No problem, Tim. Sometimes it's hard to keep up with these mailing list conversations! Thanks for your help! Rick -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 6:27 AM To: CF-Talk Subject: RE: cferror Rick... sorry I didn't respond sooner about your initial "blank screen . I think that was the same problemquestion" -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 2:04 AM To: CF-Talk Subject: RE: cferror Thanks for the in-depth analysis, Mosh! Concerning this comment: "This is still valid with one caveat; you must put CFOUTPUT tags around any variables used in the request handler." I found that out when I followed your suggestion to the user display page from within the admin diagnostic page. I ended up putting this on the application.cfm: Then, from within the "error_admin.cfm" page, I put: I could send my mail using a custom tag to send the error info to my email, and have the "CFIncluded" error_user.cfm page display the error info to the user. (After putting the 's around message for error variables.) It's going to be great having these error messages show up in my email when a user has a problem. Now, I'll be able to call them right away, if needed, instead of waiting until they get frustrated and have to call me! Thanks again! Rick -Original Message- From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:55 AM To: CF-Talk Subject: RE: cferror Mosh Teitelbaum wrote: > ... there's no reason why you can't specify multiple CFERROR > TYPE="Exception" tags as in: > > > > > > I don't know what would happen though if you did the above and > also included an EXCEPTION="All". Would it catch everything, > ignoring the other tags, or would it catch everything not > specified in the other tags. Order might matter in this case (as > it does when declaring CFCATCH blocks). Dunno... if I have some > time tonight, I'll try to remember to test it out. So I did some testing and, for those that are interested, what follows is a summary of the findings and some items to note: ColdFusion lets you define multiple instances of the CFERROR tag. The two attributes we're concerned with here are TYPE and EXCEPTION. TYPE="Request" is something of a catch all declaration that will catch all exceptions not handled by other CFERROR instances and exceptions caused by other error handlers. TYPE="Exception" allows you to define handlers on a per exception basis using the EXCEPTION attribute which can specify the name of a single exception type or the word "Any" which, like TYPE="Request", catches all exceptions not handled by other instances of CFERROR. If you specify EXCEPTION="Any", than a TYPE="Request" is used only when an exception is generated in an error handler. That is, the EXCEPTION="Any" essentially relieves TYPE="Request" of it's role as a catch-all. EXCEPTION="Any" will only catch those exceptions not otherwise handled by other EXCEPTION="" definitions. So, with the following code: An Expression exception will be handled by expression.cfm but any OTHER type of exception will be handled by any.cfm. Order of declaration does not matter. As I mentioned above, when you declare EXCEPTION="Any", TYPE="Request" is only used to catch exceptions caused by an exception handler. Even if the type of exception thrown by the handler has a defined handler (for example, if the Expression handler in the above code causes a MissingInclude exception to be thrown) it will be handled by the Request handler, not the Exception handler. Finally, I had suggested earlier in the thread that, instead of maintaining multiple displays to inform the user that an error occurred, you can simply define it once -- in the Request handler -- and just include the request handler from your other handlers. This is still valid with one caveat; you must put CFOUTPUT tags around any variables used in the request handler. All exception handlers (including Request) can access several variables from the ERROR scope. However, the request handler is limited in that it cannot make use of CFML so, to output the variables from the ERROR scope, you simply escape them with pound signs, no CFOUTPUT needed. But, if the request handler is executed by way of inclusion from another exception handler, it will be executing in the "role" of a non-request handler, i.e., it needs CFOUTPUT. Because the request handler simply ignores CFML syntax, you can wrap the variables with CFOUTPUT tags and everyone is happy. So that's it. I hope this is helpf
RE: cferror
Rick... sorry I didn't respond sooner about your initial "blank screen .. I think that was the same problemquestion" -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 2:04 AM To: CF-Talk Subject: RE: cferror Thanks for the in-depth analysis, Mosh! Concerning this comment: "This is still valid with one caveat; you must put CFOUTPUT tags around any variables used in the request handler." I found that out when I followed your suggestion to the user display page from within the admin diagnostic page. I ended up putting this on the application.cfm: Then, from within the "error_admin.cfm" page, I put: I could send my mail using a custom tag to send the error info to my email, and have the "CFIncluded" error_user.cfm page display the error info to the user. (After putting the 's around message for error variables.) It's going to be great having these error messages show up in my email when a user has a problem. Now, I'll be able to call them right away, if needed, instead of waiting until they get frustrated and have to call me! Thanks again! Rick -Original Message- From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:55 AM To: CF-Talk Subject: RE: cferror Mosh Teitelbaum wrote: > ... there's no reason why you can't specify multiple CFERROR > TYPE="Exception" tags as in: > > > > > > I don't know what would happen though if you did the above and > also included an EXCEPTION="All". Would it catch everything, > ignoring the other tags, or would it catch everything not > specified in the other tags. Order might matter in this case (as > it does when declaring CFCATCH blocks). Dunno... if I have some > time tonight, I'll try to remember to test it out. So I did some testing and, for those that are interested, what follows is a summary of the findings and some items to note: ColdFusion lets you define multiple instances of the CFERROR tag. The two attributes we're concerned with here are TYPE and EXCEPTION. TYPE="Request" is something of a catch all declaration that will catch all exceptions not handled by other CFERROR instances and exceptions caused by other error handlers. TYPE="Exception" allows you to define handlers on a per exception basis using the EXCEPTION attribute which can specify the name of a single exception type or the word "Any" which, like TYPE="Request", catches all exceptions not handled by other instances of CFERROR. If you specify EXCEPTION="Any", than a TYPE="Request" is used only when an exception is generated in an error handler. That is, the EXCEPTION="Any" essentially relieves TYPE="Request" of it's role as a catch-all. EXCEPTION="Any" will only catch those exceptions not otherwise handled by other EXCEPTION="" definitions. So, with the following code: An Expression exception will be handled by expression.cfm but any OTHER type of exception will be handled by any.cfm. Order of declaration does not matter. As I mentioned above, when you declare EXCEPTION="Any", TYPE="Request" is only used to catch exceptions caused by an exception handler. Even if the type of exception thrown by the handler has a defined handler (for example, if the Expression handler in the above code causes a MissingInclude exception to be thrown) it will be handled by the Request handler, not the Exception handler. Finally, I had suggested earlier in the thread that, instead of maintaining multiple displays to inform the user that an error occurred, you can simply define it once -- in the Request handler -- and just include the request handler from your other handlers. This is still valid with one caveat; you must put CFOUTPUT tags around any variables used in the request handler. All exception handlers (including Request) can access several variables from the ERROR scope. However, the request handler is limited in that it cannot make use of CFML so, to output the variables from the ERROR scope, you simply escape them with pound signs, no CFOUTPUT needed. But, if the request handler is executed by way of inclusion from another exception handler, it will be executing in the "role" of a non-request handler, i.e., it needs CFOUTPUT. Because the request handler simply ignores CFML syntax, you can wrap the variables with CFOUTPUT tags and everyone is happy. So that's it. I hope this is helpful. -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: cferror
Thanks for the in-depth analysis, Mosh! Concerning this comment: "This is still valid with one caveat; you must put CFOUTPUT tags around any variables used in the request handler." I found that out when I followed your suggestion to the user display page from within the admin diagnostic page. I ended up putting this on the application.cfm: Then, from within the "error_admin.cfm" page, I put: I could send my mail using a custom tag to send the error info to my email, and have the "CFIncluded" error_user.cfm page display the error info to the user. (After putting the 's around message for error variables.) It's going to be great having these error messages show up in my email when a user has a problem. Now, I'll be able to call them right away, if needed, instead of waiting until they get frustrated and have to call me! Thanks again! Rick -Original Message- From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:55 AM To: CF-Talk Subject: RE: cferror Mosh Teitelbaum wrote: > ... there's no reason why you can't specify multiple CFERROR > TYPE="Exception" tags as in: > > > > > > I don't know what would happen though if you did the above and > also included an EXCEPTION="All". Would it catch everything, > ignoring the other tags, or would it catch everything not > specified in the other tags. Order might matter in this case (as > it does when declaring CFCATCH blocks). Dunno... if I have some > time tonight, I'll try to remember to test it out. So I did some testing and, for those that are interested, what follows is a summary of the findings and some items to note: ColdFusion lets you define multiple instances of the CFERROR tag. The two attributes we're concerned with here are TYPE and EXCEPTION. TYPE="Request" is something of a catch all declaration that will catch all exceptions not handled by other CFERROR instances and exceptions caused by other error handlers. TYPE="Exception" allows you to define handlers on a per exception basis using the EXCEPTION attribute which can specify the name of a single exception type or the word "Any" which, like TYPE="Request", catches all exceptions not handled by other instances of CFERROR. If you specify EXCEPTION="Any", than a TYPE="Request" is used only when an exception is generated in an error handler. That is, the EXCEPTION="Any" essentially relieves TYPE="Request" of it's role as a catch-all. EXCEPTION="Any" will only catch those exceptions not otherwise handled by other EXCEPTION="" definitions. So, with the following code: An Expression exception will be handled by expression.cfm but any OTHER type of exception will be handled by any.cfm. Order of declaration does not matter. As I mentioned above, when you declare EXCEPTION="Any", TYPE="Request" is only used to catch exceptions caused by an exception handler. Even if the type of exception thrown by the handler has a defined handler (for example, if the Expression handler in the above code causes a MissingInclude exception to be thrown) it will be handled by the Request handler, not the Exception handler. Finally, I had suggested earlier in the thread that, instead of maintaining multiple displays to inform the user that an error occurred, you can simply define it once -- in the Request handler -- and just include the request handler from your other handlers. This is still valid with one caveat; you must put CFOUTPUT tags around any variables used in the request handler. All exception handlers (including Request) can access several variables from the ERROR scope. However, the request handler is limited in that it cannot make use of CFML so, to output the variables from the ERROR scope, you simply escape them with pound signs, no CFOUTPUT needed. But, if the request handler is executed by way of inclusion from another exception handler, it will be executing in the "role" of a non-request handler, i.e., it needs CFOUTPUT. Because the request handler simply ignores CFML syntax, you can wrap the variables with CFOUTPUT tags and everyone is happy. So that's it. I hope this is helpful. -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm