Link to home
Create AccountLog in
Avatar of kjuliff
kjuliff

asked on

Error handling in ColdFusion MX7 application.cfc

The following function in my application.cfc is not emailing ALL errors.

e.g. it doesn't email when there are syntax errors, but it does when there is un undefined variable. How can I get it to email me on ALL errors?

<cffunction name="onError">
   <cfargument name="Exception" type="any" required=true/>
   <cfargument type="String" name = "EventName" required=true/>
        <cfmail to="xxx@xxx.com" from="xxx@xxx.com" subject="Error on gumnut" type="html">
      <cfdump var="#arguments.exception#">
      Error Event: #EventName#
      
</cfmail>
</cffunction>
Avatar of rob_lorentz
rob_lorentz

need to see the cfcatch command that calls this function. can you post your entire application.cfc?
That is strange see attachment when I did the same thing. It seem to work fine.
ASKER CERTIFIED SOLUTION
Avatar of RickEpnet
RickEpnet
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer