W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2012

[Bug 16471] Exception "type"

From: <bugzilla@jessica.w3.org>
Date: Wed, 21 Mar 2012 22:01:59 +0000
To: public-script-coord@w3.org
Message-Id: <E1SATbT-0004Be-Ah@jessica.w3.org>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16471

--- Comment #5 from Travis Leithead [MSFT] <travil@microsoft.com> 2012-03-21 22:01:58 UTC ---
(In reply to comment #3)
> ...and under 4.9.2 (the ECMAScript binding), we have:
> 
> Note
> 
> If an exception is thrown with a specific type, then the rules in section 4.11
> below will create a shadowing “name” property on the exception object itself.
> 
> So, for ECMAScript, type == "name".
> 
> At least, that's how I read it :-)

Though in our planned implementation, we're making the "name" property an
accessor on the exception prototype object _exclusively_ rather than creating
the shadowed property on the instance. It's less like ECMAScript's native
Errors, but allows webdevs to hook the "name" property for tracking much easier
(across all DOM-thrown exceptions), and was self-consistent with how we had
implemented DOMException's "code" property in the past. (Run-time addition of
properties onto a thrown exception object was vetoed by my developers.)

We are also adding a stringifier.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Wednesday, 21 March 2012 22:02:02 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:05 UTC