W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

[Bug 17713] Exceptions thrown from event handlers should not be propagated

From: <bugzilla@jessica.w3.org>
Date: Sat, 03 Aug 2013 06:21:41 +0000
To: public-script-coord@w3.org
Message-ID: <bug-17713-3890-z0ZFZTxiMD@http.www.w3.org/Bugs/Public/>

Cameron McCormack <cam@mcc.id.au> changed:

           What    |Removed                     |Added
          Component|WebIDL                      |DOM
           Assignee|cam@mcc.id.au               |annevk@annevk.nl
         Whiteboard|[v1]                        |

--- Comment #15 from Cameron McCormack <cam@mcc.id.au> ---
I still disagree that you always want to swallow the exception from the
callback.  I would say, in general, that if the function you're passing the
callback to is going to synchronously call your callback, then the exception
should propagate out.  Like it does with Array.prototype.sort.  But if the
callback is going to be invoked asynchronously, then obviously there's no
top-level JS stack frame to propagate it out to.

If I were designing dispatchEvent from scratch, I would make it propagate the
exception.  But since we're stuck with eating it, I think that should be done
in the prose defining dispatchEvent.

Re-assigning back to Anne.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Saturday, 3 August 2013 06:21:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:17 UTC