My post above is wrong. Here is what I wanted to happen:

 <cffunction name="onError" access="public">
        <cfargument name="exception" required="true">
           <cfargument name="EventName" type="String" required="true">
           <!---if the request is ajax, throw an error that can be returned
to the client in a basic string and then log the error as usual--->
           <cfif  StructKeyExists(requestHeaders, "X-Requested-With") and
StructFind(requestHeaders,"X-Requested-With") eq "XMLHttpRequest">
            <cfdump var="#arguments.exception#">
            <cfheader statusCode="500" statusText="ColdFusion Error">
        <cfelse>
            <cfdump var="#arguments.exception#">
        </cfif>
    </cffunction>

This throws the error and dumps it out in html for firebug but ajaxSetup()
now knows what to do with it based on x.status == 500 &&
x.statusText=="ColdFusion Error".


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336912
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to