Bugzilla – Bug 16454
Last modified: 2012-03-21 23:00:50 UTC
The spec says "When an algorithm says to “throw a SomethingError” then this means to construct a new ECMAScript SomethingError object and to throw it, just as the algorithms in ECMA-262 do."
But you only ever throw a TypeError (or I could not find any other type of error?). I think it would be better to have all throw TypeError just link directly to ECMAScript5.
Indexed DB does that. What is wrong with having a convenience hook?
(In reply to comment #1)
> Indexed DB does that. What is wrong with having a convenience hook?
Nothing wrong, if it does something. If in this case it doesn't do anything, then it is redundant. I would rather click on "throw an TypeError" and be taken straight to ECMAScript5 (rather than do a roundtrip). http://es5.github.com/#x188.8.131.52
Yeah, sorry it would be good to have a link to the actual ECMAScript requirements. I've added a link from #dfn-throw to #es-throwing-exceptions.