I am using ASP.net's AJAX framework and I am trying to do some exception logging on the javascript-called webservice.
Looking through the web, I find some people handling them client-side and sending them back to the server. I'd prefer not doing that since it relies on an other server call (if it failed the first time, sending an other request doesn't look like a good idea and that makes me change all my calls)
I see some other people decorating all their methods with try... catch blocks (which leads to duplicate error handling, and yet an other try catch block).
However, I'm trying to achieve something similar to global.asax's Application_Error()
which handles every uncaught exception (nope, it doesn't seem to be called for AJAX called methods exceptions).
Is that even possible?
Use ELMAH - it can capture ajax errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With