W3C home > Mailing lists > Public > public-webrtc@w3.org > June 2013

Re: Operations in invalid states: Exceptions don't make sense.

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Tue, 4 Jun 2013 14:52:08 +0200
Message-ID: <51ADE2F8.5040006@ericsson.com>
To: Justin Uberti <juberti@google.com>
CC: Martin Thomson <martin.thomson@gmail.com>, Harald Alvestrand <harald@alvestrand.no>, "public-webrtc@w3.org" <public-webrtc@w3.org>
On 2013-06-01 02:04, Justin Uberti wrote:
> Was a decision reached here? It seems unfortunate to have to add
> success/failure callbacks to several methods just to better handle being
> called in the "closed" state.

No, I don't think that would be nice.

The spec is a bit inconsistent at the moment but I think that 
setLocal/RemoteDescription handles this fairly well. The state is 
checked for closed before the real work is handed over to the WebRTC 
backend. That makes these methods consistent with other methods (e.g. 
addStream) that doesn't have success/failure callbacks; they don't do 
anything on a closed PeerConnection.

People who expressed their opinions also thought that calling close() 
several times shouldn't result in an error.

Received on Tuesday, 4 June 2013 12:52:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:17:44 UTC