Using application.cfc, you can use the OnError method, ie.

<cffunction name="OnError" access="public" returntype="void"
output="true" hint="Fires when an exception occures that is not caught
by a try/catch block">
        <cfargument name="Exception" type="any" required="true"  />
        <cfargument name="EventName" type="string" required="false" default="" 
/>

        <cfmodule template="/errors/fullhandler.cfm"
exception="#arguments.exception#" eventname="#arguments.eventname#"
/><!--- or just a cfinclude will do fine --->
</cffunction>

2009/6/1 ColdFusion Developer <cfdev2...@gmail.com>:
>
> I have a web application utilizing CF7 and within the Application.cfc file,
> I have a function called onError to handle the error trapping.
>
> This works find for the simple errors but if an error occurs in a CFC, it is
> not trapped.
>
> I have the three error types specified as:
>
> <cferror type="exception" template="/errors/fullhandler.cfm">
>  <cferror type="request" template="/errors/fullhandler.cfm">
>  <cferror type="validation" template="/errors/fullhandler.cfm">
>
> How can I trap CFC errors (other tran wrapping EACH cfc invoke call with a
> CFTR/CATCH routine?
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:323021
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to