handle javascript errors on the client side from arbitrary sites

Discussion in 'Javascript' started by figelwump@gmail.com, Apr 4, 2006.

  1. Guest

    Hello,

    I'd like to be able to write an application that runs on a Windows XP
    machine and can capture and handle javascript errors from any web site
    that a user might encounter while using IE on that box. It doesn't
    matter what language the application is written in.

    I don't know if this is a Javascript question or a Windows component
    question. Any ideas/thoughts on how to do this?

    Thanks
     
    , Apr 4, 2006
    #1
    1. Advertising

  2. VK Guest

    wrote:
    > Hello,
    >
    > I'd like to be able to write an application that runs on a Windows XP
    > machine and can capture and handle javascript errors from any web site
    > that a user might encounter while using IE on that box. It doesn't
    > matter what language the application is written in.


    It is not clear what do you mean by "handle errors". To force the
    script engine to disregard any errors and continue execution? This is
    kinda pointless and against the common programming practice. I mean if
    an error is cricial (no required object, no requested method etc.) then
    how do you suppose to continue this block?

    If you mean "bring all errors to the attention of user" then IE already
    does it by default (red exclamation sign).

    You may extend the latter option by installing free Microsoft Script
    Debugger module
    <http://en.wikipedia.org/wiki/Microsoft_Script_Debugger>

    Now all errors will be displayed consecutively in the debugger window.
    Unfortunately this debugger is weak in finding the right line causing
    the error, especially with external .js files, so its highlight may be
    off the base.

    Presumably it is possible to patch jscript.dll so all errors would go
    to some external program instead of debugger. This question is related
    to C++ programming though, plus I am not sure if such action would be
    legal withing your user agreement (smells a lot like reverse
    engineering to me). Ask.
     
    VK, Apr 5, 2006
    #2
    1. Advertising

  3. Guest

    Thanks for the response. When I say "handle errors", I mean an
    application that can catch JS errors arising from any arbitrary page
    that a user browses in IE. The user should then be able to continue
    browsing normally (without having to dismiss a JS error dialog).

    IE does some level of this if script debugging is disabled, but is not
    able to hide all errors from the user. I would like to write a program
    that extends this functionality to unconditionally hide any JS error
    from the user.

    I am not concerned with the continued execution of the JS code; the
    user is browsing any arbitrary site and I do not have access to the
    code. So, if the site is broken because of a critical JS error that
    they did not handle internally, that's fine. Additionally I do not
    want to modify the script engine (or any other IE components).

    Any ideas on how to do this? Are there any hooks into IE or the script
    engine that can be used here?

    Thanks
     
    , Apr 6, 2006
    #3
  4. VK Guest

    wrote:
    > I would like to write a program
    > that extends this functionality to unconditionally hide any JS error
    > from the user.


    AFAIK it can be done 90% without any programming:
    Tools > Internet Options > Advanced
    check Disable script debugging
    uncheck Display a notification about every script error

    That leaves the red exclamation sign only for something IE will
    consider to be too important - but it still doesn't disturb the
    browsing, because nothing forces you to double click on it to see
    what's happened (and most users simply ignore it).

    I do not think so that you can go with the rest 10%, because red sign
    is not specially appointed to JScript errors. It is a notification sign
    for any events browser considers important to report. Say it will be
    shown if site doesn't have P3P politics for cookies, or if it tries to
    set a cookie not matching to your cookie security settings, or if you
    switch security protocol (on high security) etc. You will really need
    to "kill" too many reporters for that. Also I would consider such build
    as one with seriously damaged security - and the IE's default one is
    not the most shinny under the sun ;-)

    Any way, contact IEAK department and ask their advise:
    <http://www.microsoft.com/technet/prodtechnol/ie/ieak/default.mspx>
     
    VK, Apr 6, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Honestmath
    Replies:
    5
    Views:
    571
    Honestmath
    Dec 13, 2004
  2. Boss302
    Replies:
    0
    Views:
    1,070
    Boss302
    Nov 21, 2006
  3. Bogdan
    Replies:
    2
    Views:
    667
    Bogdan
    Jun 9, 2008
  4. Blair Taylor
    Replies:
    1
    Views:
    347
    Alvin Bruney
    Aug 7, 2003
  5. Zoe Hart
    Replies:
    1
    Views:
    383
    Scott Wisniewski
    Jan 8, 2004
Loading...

Share This Page