webidl icon indicating copy to clipboard operation
webidl copied to clipboard

Use RangeError rather than TypeError for enum mismatch

Open annevk opened this issue 6 years ago • 3 comments

As per https://lists.w3.org/Archives/Public/public-script-coord/2013JulSep/0330.html this is a mismatch with JavaScript. Fixing this is a little risky, but we've successfully changed exception types in the past which makes me hopeful.

cc @littledan

annevk avatar Dec 06 '17 11:12 annevk

FWIW ES6 changed a bunch of error classes, and I don't remember any compatibility reports in Chrome from that specifically. The extremely coarse error classes are just not very useful...

Note that we have lots more enum-style things in ECMA-402, and we like to throw RangeError. See https://tc39.github.io/ecma402/#sec-getoption

littledan avatar Dec 09 '18 18:12 littledan

Is this still doable?

saschanaz avatar Aug 07 '21 20:08 saschanaz

Doable? Probably. Worth the effort? Seems unlikely...

domenic avatar Aug 07 '21 21:08 domenic