Error Handling (Section 4.6)

Hi

Some quoted spec text:

> An exception must be thrown in the following cases:
>  * The type of any argument passed to a function did not match what was expected. An appropriate string from the RTCExceptionName enum must be used as the error name.

> enum RTCExceptionName {
>     "INVALID_SUCCESS_CALLBACK",
>     "INVALID_FAILURE_CALLBACK",
>     "INVALID_CONSTRAINTS_TYPE",
>     "INVALID_SESSION_DESCRIPTION_TYPE",
>     "INVALID_CONFIGURATION_TYPE",
>     "INVALID_CANDIDATE_TYPE",
>     "INVALID_MEDIASTREAM",
>     "INVALID_MEDIASTREAM_TRACK",
>     "INVALID_STATE"
> };

I find the spec text about handling arguments with invalid types 
redundant. The argument translation defined by WebIDL should take care 
of this for us and throw a type error when appropriate.

/Adam

Received on Wednesday, 12 December 2012 07:25:33 UTC