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

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.

/Adam

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