This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16454 - SomethingError
Summary: SomethingError
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2012-03-20 18:25 UTC by Marcos Caceres
Modified: 2012-03-21 23:00 UTC (History)
3 users (show)

See Also:


Description Marcos Caceres 2012-03-20 18:25:41 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.
Comment 1 Anne 2012-03-20 20:16:21 UTC
Indexed DB does that. What is wrong with having a convenience hook?
Comment 2 Marcos Caceres 2012-03-20 20:26:18 UTC
(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).
Comment 3 Cameron McCormack 2012-03-21 23:00:50 UTC
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.