powered by Authenteo
by Xucia  

Learn more

Internet Explorer Try Catch

Internet Explorer has some funny exception handling.  Here are few of the idiosyncrasies:

  1. The exception object is pretty useless, it really does not contain much exception an error message. (A stack trace is what we really want like Opera provides, but even a line number would be nice).
  2. The Microsoft Script Editor/Debugger does not stop on errors or exceptions being thrown, but rather on uncaught exceptions/errors. This means if you have a try/catch, your exception will not trigger the debugger, and you are left with IE's worthless error messages.
  3. When you do hit an uncaught exception, the script debugger does not let you go directly to resume, you have to manually move the the code pointer to another line and go past.  The natural result of an exception is stop execution, why doesn't the MSE let you resume to that natural result like every other debugger in the world?
  4. If you have a try/finally, the finally does not get executed if the exception is uncaught.  This is of course especially aggravating consider the first problem.
  5. Try/Catch does not work in an HTML inline event handler.  That is, this will not catch a thrown exception:

    <div onclick="try{test()}catch(e){}">

Because of these problems, there will probably be one function that triggers most of the functions (the event listener and the thread resumer) that will be able to switch back forth from no exception catching (for debugging), to exception catching (so that finally blocks work).

News

Authenteo 1.1 is available.

Firebug - Web Development Evolved Now with Firebug integration . Make changes to CSS and HTML with Firebug and save the changes

Check out press releases and the following articles on Authenteo:

Authenteo beta