Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RangeError rather than TypeError for enum mismatch #489

Open
annevk opened this issue Dec 6, 2017 · 3 comments
Open

Use RangeError rather than TypeError for enum mismatch #489

annevk opened this issue Dec 6, 2017 · 3 comments
Labels

Comments

@annevk
Copy link
Member

annevk commented Dec 6, 2017

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 annevk added the jsidl label Dec 6, 2017
@littledan
Copy link
Collaborator

littledan commented Dec 9, 2018

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

@saschanaz
Copy link
Member

Is this still doable?

@domenic
Copy link
Member

domenic commented Aug 7, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants