[Bug 14887] Prototype of exception interface objects is Object.prototype in implementations, not Error.prototype

https://www.w3.org/Bugs/Public/show_bug.cgi?id=14887

Aryeh Gregor <ayg@aryeh.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #4 from Aryeh Gregor <ayg@aryeh.name> 2011-12-27 14:40:11 UTC ---
(In reply to comment #3)
> Is this issue here the prototype or the stringification?  I think we want to
> keep the prototype change, as part of the new exception model.

That's fine by me.  Then no spec change is needed AFAICT.  I've changed the
tests to match the spec instead of browsers:

http://dvcs.w3.org/hg/html/rev/f06e5627c826

> This is what browser do currently for a HIERARCHY_REQUEST_ERR DOMException:
> 
> * Firefox: '[Exception... "Node cannot be inserted at the specified point in
> the hierarchy" code: "3" nsresult: "0x80530003
> (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)" location: "blah"]'
> * Opera: 'DOMException: HIERARCHY_REQUEST_ERR'
> * Safari/Chrome: 'Error: HIERARCHY_REQUEST_ERR: DOM Exception 3'
> * IE: 'DOM Exception: HIERARCHY_REQUEST_ERR (3)'
> 
> So there's a bit of variety there.

That's partly because DOM4 leaves the value of .message undefined, although
also partly because browsers don't agree on what .name should be and/or don't
follow ES5's Error.prototype.toString().

-- 
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 Tuesday, 27 December 2011 14:40:25 UTC