W3C home > Mailing lists > Public > public-webrtc@w3.org > July 2015

Re: Removing syntaxerror for ice candidates

From: Dominique Hazael-Massieux <dom@w3.org>
Date: Thu, 09 Jul 2015 12:23:48 +0200
Message-ID: <559E4BB4.9010305@w3.org>
To: Harald Alvestrand <harald@alvestrand.no>, public-webrtc@w3.org
On 09/07/2015 12:09, Harald Alvestrand wrote:
>> It does fail, but not with a SyntaxError (which is what I'm suggesting
>> we remove).
>
> So you're suggesting we remove the SyntaxError, but continue failing ...
> what are you suggesting we use as a failure instead?
>
> I'm much happier with proposing "change error code X to Y in case W"
> than with "remove SytaxError".

The spec already has a step failure after the current syntaxerror:
   If the candidate parameter is malformed, reject p with SyntaxError and
   jump to the step labeled Return.

   If the candidate could not be successfully applied, reject p with a
   DOMError object whose name attribute has the value TBD
http://w3c.github.io/webrtc-pc/#widl-RTCPeerConnection-addIceCandidate-Promise-void--RTCIceCandidate-candidate

I don't have a specific probably for what TBD should be; the spec 
suggests InvalidCandidate and InvalidMidIndex, but that probably needs 
to be revisited in light of how we now understand errors should be managed.

But even if the whole picture is not clear yet, the reasons for removing 
syntaxerror (not well defined, not implemented, not necessary) still stand.

Dom
Received on Thursday, 9 July 2015 10:23:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:45 UTC