[Bug 16471] Exception "type"

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 the QA contact for the bug.

Received on Wednesday, 21 March 2012 22:02:01 UTC