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

Reply via email to