I know you guys made some changes to exception handling for v0.8 so I want to revisit an issue I have. I have global error handling code in Global.asax's Application_Error event. This is the fail safe event where ALL ASP.NET errors will eventually flow to. It's the preferred way to handle exceptions such as logging, redirecting, etc. Exceptions thrown during an AjaxEvent properly flows to that function. However, exceptions thrown during an AjaxMethod such as GridPanel's RefreshData or my own AjaxMethod do NOT flow to Global.asax.

I looked at your sample on exception handling and while it works for a single method, it is not ideal. If I want to give a custom message, I have to write code in the server event AND on the client side failure function. I do not want to write the same code over and over and over again every time I create an AjaxMethod or drop a grid onto a page. Currently, we have a lot of support issues with users seeing no data being returned in a grid due to a server exception. The exception is not Coolite's fault, but it is often hard to track down the issue because it is not hitting our global error handling code. To us, it's like the exception is being swallowed. To the user, it's like something may have went wrong but they are not sure. Did an error occur or is there really no data?


Is there a way to fire off an event that I can catch? Or set some global method to call when an exception occurs?