[CLOSED] Global handling of GridPanel RefreshData / AjaxMethods exceptions

  1. #1

    [CLOSED] Global handling of GridPanel RefreshData / AjaxMethods exceptions

    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?




  2. #2

    RE: [CLOSED] Global handling of GridPanel RefreshData / AjaxMethods exceptions

    Hi,

    I think we can add something like AjaxEventError event for ScriptManager (it will be raised if exception occurs during data bing or ajax method execution). We will implement it the other day
  3. #3

    RE: [CLOSED] Global handling of GridPanel RefreshData / AjaxMethods exceptions

    Hi Jacky,

    We've added three new Listeners (BeforeAjaxRequest, AjaxRequestComplete, AjaxRequestException) to the ScriptManager.


    See http://forums.ext.net/showthread.php?3920#post15720


    Hope this helps.
    Last edited by geoffrey.mcgill; Jan 11, 2011 at 10:29 PM.
    Geoffrey McGill
    Founder
  4. #4

    RE: [CLOSED] Global handling of GridPanel RefreshData / AjaxMethods exceptions

    Sorry for bringing this up but we really need a SERVER event to fire, not a client event. The client event is good too but it's doesn't really help us log the exceptions. There are alot of serverside variables we want to log to help us debug the exception later on. I have about 20 AjaxMethods on a page and I have to wrap each of them in a try...catch to log the exception. It's not ideal.
  5. #5

    RE: [CLOSED] Global handling of GridPanel RefreshData / AjaxMethods exceptions

    Hi,

    We have add new property for ScriptManager


    RethrowAjaxExceptions

    if you set true then you should be able to catch exception in the Application_Error
    Please update from SVN and confirm

Similar Threads

  1. [CLOSED] Javascript Global Error Handling
    By adelaney in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 20, 2012, 8:30 PM
  2. Global Error Handling
    By wdk in forum 1.x Help
    Replies: 2
    Last Post: Apr 03, 2012, 2:34 AM
  3. [CLOSED] Global Exception Handling How to?
    By ISI in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 11, 2011, 11:57 AM
  4. [CLOSED] [1.0] Global error handling of DirectMethods
    By jchau in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 27, 2010, 7:59 PM
  5. [CLOSED] Global exception handling - wrong response or no failure
    By pschojer in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 13, 2010, 2:03 PM

Posting Permissions