[CLOSED] Global exception handler

  1. #1

    [CLOSED] Global exception handler

    Hi all,

    i need a Global exception handler for asp.net errors and ajaxrequest errors (like for example comunication failure).
    My handler must intercept errors and visulize a messagebox with details of error and log to database.
    But i do not know how to intercept errors from directevents or directmethods (server side if is possible).

    Thanks.
    Last edited by Daniil; May 08, 2013 at 3:20 PM. Reason: [CLOSED]
  2. #2
  3. #3
    Hi Raphael,

    thank for your reponse.
    But is possible with this sample to intercept errors on ajaxrequest generated by directevents or directmethods?
    I would like to emulate ajaxrequestwarningfailure of ext.net and visualize similar messagebox for both, server side and ajaxrequest errors.
  4. #4
    Hi @infonext,

    Yes, it should work.

    The only thing you might need to set up is
    RethrowAjaxExceptions="true"
    for a ResourceManager or
    rethrowAjaxExceptions="true"
    in the extnet seciton in a Web.config.

    Also it is possible to set up via a Session and an Application objects.

    Ext.NET uses try/catch block somewhere. To get those exceptions rethrown, it needs to set up that option to true.
    Last edited by Daniil; May 06, 2013 at 3:30 PM.
  5. #5
    Hi Daniil,

    thanks for your reponse. I try to get exception on Page_error (all pages inherits from a base page), but if for example a directevents times out and i get a comunication failure message, the Server.GetLastError() is empty.
    How i can know the error type in this case?
  6. #6
    I guess that communication failure is not server side error (it can be timeout issue (timeout in javascript code) or problems with net) therefore such error you will not get on the server side
    Vladimir Shcheglov
    Sr. Developer
  7. #7
    Hi Vladimir,

    is what i thought (sorry but i aren't very experienced with client side code).
    Then if i i wanted to write a global exception handler in javascript for client side errors what strategy should i use?

    Thanks.
  8. #8
    You can try with window.onerror.
    http://stackoverflow.com/questions/9...error-handling

    Also I would try to use a ResourceManager's AjaxRequestException event. It should catch communication failures.
  9. #9
    Hi Daniil,

    many thanks.
    With AjaxRequestException on listner of ResourceManager i solved my problem.

    You can close the thread.

Similar Threads

  1. [CLOSED] EXT.NET Timeout global settings
    By agonzalez in forum 1.x Premium Help
    Replies: 2
    Last Post: Jan 21, 2013, 4:26 AM
  2. Replies: 0
    Last Post: Dec 05, 2012, 8:22 PM
  3. [CLOSED] Global Exception Handling How to?
    By ISI in forum 1.x Premium Help
    Replies: 1
    Last Post: May 11, 2011, 11:57 AM
  4. Replies: 2
    Last Post: Jul 13, 2010, 2:03 PM
  5. How to setting global Locale ?
    By guaike in forum 1.x Help
    Replies: 1
    Last Post: May 13, 2009, 4:26 PM

Tags for this Thread

Posting Permissions