On Feb 12, 2008 12:46 PM, Andreas Junghans <[EMAIL PROTECTED]> wrote:
> > I discovered another related problem recently.  throw new Error()
> > doesn't actually process the thrown error until after completion of
> > the current javascript context.  For example, if you have a loop and
> > an error is thrown in the middle of the loop, the loop keeps running
> > to completion.  Once control returns to the browser, the thrown error
> > will be displayed in firebug.  This can be easily seen by having a
> > this.debug() call in the loop.  The debug statements show that all
> > iterations of the loop completed even though the error was thrown
> > during some early iteration.
>
> First I thought "WHAT THE FRAK?!". Then I calmed down and actually
> tried it, and it sure doesn't happen for me. I don't have firebug
> installed in the Firefox instance I'm currently running, but I doubt
> that firebug alters such basic behaviour. It would actually be quite
> frightening ...  Or maybe there's a "log errors, but keep running as
> if they hadn't happend" option somewhere in firebug?

You're right: it's certainly not something that's supposed to be
happening.  I conclusively proved that it was happening, though.  I
put a debug statement immediately before the throw and it displayed.
After that debug statement, all of my other debug statements
throughout the loop displayed, followed by the red error from the
throw.  It's almost certainly a firebug "feature".

Derrell

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to