I am using the ASP.NET AJAX framework and I am trying to do some exception logging in a web service called javascript.
Browsing over the Internet, I find some people who process them on the client side and send them back to the server. I would prefer not to do this because it relies on another server call (if it wasn’t executed the first time, sending another request doesn’t seem like a good idea, and it makes me change all my calls)
I see some others decorating all my methods with try ... catch blocks (which leads to duplicate error handling, and yet another try catch catch block).
However, I am trying to achieve something similar to global.asax Application_Error()that handles every uncaught exception (no, it doesn't seem to be called for AJAX called method exceptions).
Is it possible?
source
share