Re: Error handling

TYPE_ERROR is common as well and is probably the correct action for the
three first cases.

/Tommy

On Sat, Sep 3, 2011 at 00:15, Justin Uberti <juberti@google.com> wrote:

> The current specification indicates that INVALID_STATE_ERR exceptions may
> be thrown if methods are called on a PeerConnection that is in the wrong
> state. However, other sorts of errors can of course occur:
> - a bad object (i.e. not a MediaStream) is passed to addStream
> - processSignalingMessage receives an malformed signaling blob
> - processSignalingMessage receives an incompatible description (no codecs,
> incompatible codecs, incompatible crypto)
> - an internal failure occurs while processing an arbitrary API call
> - connectivity fails to establish, or is lost mid-call
>
> I think we may need to document/define some additional exception types, as
> well as some sort of async onerror callback to indicate a fatal session
> failure. I see that DOMException defines a SYNTAX_ERR which could be used
> for the malformed blob case, but is there something else that can be used
> for general internal errors?
>



-- 
Tommy Widenflycht, Senior Software Engineer
Google Sweden AB, Kungsbron 2, SE-11122 Stockholm, Sweden
Org. nr. 556656-6880
And yes, I have to include the above in every outgoing email according to EU
law.

Received on Monday, 5 September 2011 13:07:51 UTC