[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).

    Last edited by Daniil; May 08, 2013 at 4: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
    for a ResourceManager or
    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 4: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?

  8. #8
    You can try with window.onerror.

    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, 5:26 AM
  2. Replies: 0
    Last Post: Dec 05, 2012, 9:22 PM
  3. [CLOSED] Global Exception Handling How to?
    By ISI in forum 1.x Premium Help
    Replies: 1
    Last Post: May 11, 2011, 12:57 PM
  4. Replies: 2
    Last Post: Jul 13, 2010, 3:03 PM
  5. How to setting global Locale ?
    By guaike in forum 1.x Help
    Replies: 1
    Last Post: May 13, 2009, 5:26 PM

Tags for this Thread

Posting Permissions