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: Sun, 04 Aug 2013 03:51:23 +0000
To: public-script-coord@w3.org
Message-ID: <bug-17713-3890-1hJCvXmf4u@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17713

--- Comment #17 from Jonas Sicking <jonas@sicking.cc> ---
My perception is that the thing people were mostly upset about with
.dispatchEvent is that it does "magic". I.e. it does things that can't be
replicated in JS.

An easy way to fix that would be to add something like

console.reportError(exception);

This would do exactly the same reporting as we currently do for errors that are
thrown by event listeners (which I *think* is the same error reporting as we do
for unhandled errors?).

Or we could add something like

window.reportError(exception);

which would both fire window.onerror as well as do the appropriate error
reporting if that error went unhandled.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Sunday, 4 August 2013 03:51:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC