[heycam/webidl] [EnforceRange] should normatively specify RangeError (#359)

Ecma-262 defines [RangeError](https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-rangeerror): 

> 19.5.5.2 RangeError
> Indicates a value that is not in the set or range of allowable values.

Presumably, that's what `[EnforceRange]` wants to do, but the examples shown say "TypeError", which is wrong because that's defined as

> 19.5.5.5 TypeError
> TypeError is used to indicate an unsuccessful operation when none of the other NativeError objects are an appropriate indication of the failure cause.

This will have the added benefit of making specifications more testable (presently an implementation could throw any kind of error object it wanted).


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/359

Received on Wednesday, 10 May 2017 18:38:21 UTC