- From: Adam Bergkvist <adam.bergkvist@ericsson.com>
- Date: Wed, 15 Jul 2015 08:48:57 +0000
- To: Dominique Hazael-Massieux <dom@w3.org>, Harald Alvestrand <harald@alvestrand.no>, "public-webrtc@w3.org" <public-webrtc@w3.org>
On 2015-07-09 12:25, Dominique Hazael-Massieux wrote: > 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 > If we plan to fail when an RTCIceCandidate is constructed with a bad candidate string, we need to perform the same check every time the corresponding attribute is set. /Adam
Received on Wednesday, 15 July 2015 08:49:26 UTC