[CLOSED] Javascript unhandled exception & program execution behavior

  1. #1

    [CLOSED] Javascript unhandled exception & program execution behavior

    Hi Ext.Net Team,
    I have seen some cases in my application that sometime JavaScript unhandled exception is appearing in the console and then after my program misbehave after such events (these javascript unhandled exception is not belongs to my code), the cause of such unhandled exception may be due to user has pressed ESC key while Ext.NET was executing some of the direct events and the result is not fully received by the browser, also their could be other cases but this is what I am just guessing right now, but due to any unhandled javascript exception (which is not belong to my code) is there a way to handle all Javascript unhandled exception globally and then either do the following things:

    1) Force the user to restart their browser and halt current program execution with some modal window.
    2) Clear all unhandled JavaScript exceptions in the current browser session programmatically. And auto restart the logged-in user session (by redirecting to the login or to default home page automatically).

    Please advise

    Thanks
    Last edited by Daniil; Sep 29, 2015 at 4:35 PM. Reason: [CLOSED]
  2. #2
    Hi @VSPL,

    is there a way to handle all Javascript unhandled exception globally
    There is a window.onerror handler you could try with.
    http://forums.ext.net/showthread.php...l=1#post125620

    A ResourceManager's AjaxRequestException listener might be helpful as well.
    http://forums.ext.net/showthread.php...l=1#post110214

    1) Force the user to restart their browser and halt current program execution with some modal window.
    It should not be a problem once you catch the error.

    2) Clear all unhandled JavaScript exceptions in the current browser session programmatically.
    I don't think that unhandled JavaScript exceptions are store anywhere. So, I don't think there is a way to clear it. Though, if a page is being refreshed or redirected then, I guess, it does the job that you need - it will start working as no error happened.

    And auto restart the logged-in user session (by redirecting to the login or to default home page automatically).
    Redirecting should not be a problem once you catch the error. This JavaScript code redirects:
    window.location = "New URL";
  3. #3

    Status

    Hi Daniil,
    I am doing the changes you suggested, will provide the feedback in few days, thanks for the support.

Similar Threads

  1. [CLOSED] Unhandled exception In Ext.net 3.2.1
    By tnwheeler in forum 3.x Premium Help
    Replies: 10
    Last Post: Sep 11, 2015, 12:28 PM
  2. Replies: 13
    Last Post: Mar 02, 2015, 9:33 PM
  3. Replies: 9
    Last Post: Apr 12, 2014, 4:41 PM
  4. Replies: 3
    Last Post: Apr 07, 2014, 4:01 PM
  5. [CLOSED] Behavior javascript
    By rnfigueira in forum 1.x Premium Help
    Replies: 4
    Last Post: Aug 18, 2011, 2:43 PM

Tags for this Thread

Posting Permissions