Skip to main content
May 20, 2009
Question

CFCs and Site Wide Error Handlers

  • May 20, 2009
  • 1 reply
  • 523 views

Hi. I setup a site-wide error handler page in CFAdministrator to email me the diagnostic and debugging information regarding erros that my web app users encounter. This is great for both security (users cannot see important debug info and SQL logic) and to allow me and my team to investigate and fix the problem.

I noticed in CF that when i perform remote calls (from AJAX or FLEX) and an error is encountered in the CFC code... I do not receive the debugging emails. It seems to not work for CFC files? Only CFM? Let me know if I'm doing something wrong or need to do something extra. CFTRY and CFCATCH would be very annoying to have to use if I needed to add that to every CFC page I have!

Thanks,

-BosDog

    This topic has been closed for replies.

    1 reply

    Inspiring
    May 20, 2009

    If you're using Application.cfc, you can use the onError method to execute the error handling. I use this for all RIA-related apps.

    May 20, 2009

    Great thanks for the tip! I am using application.cfc so I'll give that a whirl.