On Mon, Jun 23, 2014 at 12:44 PM, Boris Zbarsky <[email protected]> wrote:

> On 6/23/14, 3:35 PM, Kevin Reid wrote:
>
>> Yes, but setTimeout may be less prompt than you want depending on the
>> application
>>
>
> Note that at least in some browsers window.onerror is called off an event
> loop task anyway.


Clarification: I meant how promptly the listener is invoked (independent of
the error case).


>  This has a nifty advantage in debuggability: you can declare that a
>> debugger's "stop on uncaught exception" should stop on such errors
>> _before the stack is unwound_.
>>
>
> Note that such a facility would still fail in cases when a catch examines
> and then rethrows an exception,


Yes, it would stop at the rethrow rather than the original throw. Doing
more than that is hard.


> and in fact allows observably detecting whether an exception is caught and
> rethrown or just not caught.


I did not intend it to do so. Could you explain?

(You can notice rethrows and things by inspecting the stack trace, but I
assume that's not what you meant.)
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to