Re: cfabort triggering onError function in Application.cfc
aborts will trigger an error inside a cfc being called as a web service. - Original Message From: Jake Pilgrim [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Tuesday, June 12, 2007 5:06:18 PM Subject: Re: cfabort triggering onError function in Application.cfc An abort is an exception that is caught by the onError event handler. Whether this is a bug or a desired effect is debatable, but this does in fact happen. However it is easy enough to catch: cffunction name=onError returntype=void cfargument name=Exception required=true/ cfargument name=EventName type=String required=true/ cfif arguments.exception.rootCause NEQ coldfusion.runtime.AbortException ... do error handling /cfif /cffunction Voila! Jake Pilgrim Since I implemented the onError function in my Application.cfc the cfabort seems to be triggering it. Is this normal? if so how do I work around this? I'm fairly certain cfabort doesn't trigger onError; at least I haven't seen that before. You might have another error around the cfabort tag that is causing onError to be triggered. If you're in a dev environment, you could comment out onError and cfabort for the moment and see exactly what error is being generated. -- Josh ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280942 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfabort triggering onError function in Application.cfc
Thanks for the help guys, I got it working using Jake's cfif statement. Sometimes it's the simple things that throw me off hehe. -- Steve Good [EMAIL PROTECTED] Portal Hosting http://www.lanctr.com ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281097 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfabort triggering onError function in Application.cfc
I'm trying to catch errors and display them in a prettier way on one of my applications. However part of the login script I use has a cfabort tag in it to stop processing until the user is authenticated. Since I implemented the onError function in my Application.cfc the cfabort seems to be triggering it. Is this normal? if so how do I work around this? Thanks! Yeah, that's a bug Ray blogged about. http://www.coldfusionjedi.com/index.cfm/2005/9/28/Two-Nice-Fixes-in-ColdFusion-701 Will ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280895 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfabort triggering onError function in Application.cfc
Since I implemented the onError function in my Application.cfc the cfabort seems to be triggering it. Is this normal? if so how do I work around this? I'm fairly certain cfabort doesn't trigger onError; at least I haven't seen that before. You might have another error around the cfabort tag that is causing onError to be triggered. If you're in a dev environment, you could comment out onError and cfabort for the moment and see exactly what error is being generated. -- Josh ~| ColdFusion 8 beta â Build next generation applications today. Free beta download on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280897 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfabort triggering onError function in Application.cfc
An abort is an exception that is caught by the onError event handler. Whether this is a bug or a desired effect is debatable, but this does in fact happen. However it is easy enough to catch: cffunction name=onError returntype=void cfargument name=Exception required=true/ cfargument name=EventName type=String required=true/ cfif arguments.exception.rootCause NEQ coldfusion.runtime.AbortException ... do error handling /cfif /cffunction Voila! Jake Pilgrim Since I implemented the onError function in my Application.cfc the cfabort seems to be triggering it. Is this normal? if so how do I work around this? I'm fairly certain cfabort doesn't trigger onError; at least I haven't seen that before. You might have another error around the cfabort tag that is causing onError to be triggered. If you're in a dev environment, you could comment out onError and cfabort for the moment and see exactly what error is being generated. -- Josh ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280902 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfabort triggering onError function in Application.cfc
An abort is an exception that is caught by the onError event handler. Whether this is a bug or a desired effect is debatable, but this does in fact happen. However it is easy enough to catch: Hmmm...very interesting indeed. I just did a test, and cfabort did not seem to trigger onError...at least it didn't run the error handling code within the method...just a blank page as expected. I need to investigate further. -- Josh ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280909 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4