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

Re: Proposal for error handling (programming vs runtime errors)

From: Martin Thomson <martin.thomson@gmail.com>
Date: Fri, 22 Feb 2013 09:28:31 -0800
Message-ID: <CABkgnnX8X2Rnmpmncy34yHio6KGEBiqi=29wmbvf1xyVz14GaQ@mail.gmail.com>
To: Justin Uberti <juberti@google.com>
Cc: Arnaud Morin <arnaud1.morin@orange.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>, Cullen Jennings <fluffy@cisco.com>
On 22 February 2013 08:46, Justin Uberti <juberti@google.com> wrote:
> I considered that, but that seems overly complex - should we add callbacks
> to every single API? And what do we do if someone passes a string as the
> callback parameter?

Yes.  There's a line to draw, and to a large extent, the choice of
where is arbitrary.

Clearly, there are many different ways to implement this as well.  We
want to draw the line in a place that offers implementations a degree
of flexibility.  This is as good a trade-off as any.

Also, as we've already agreed, we should make it doubly clear that any
and all callbacks occur *after* the browser has returned to a stable
state.  Even if an implementation discovers some callback-generating
errors synchronously, it needs to wait before firing the callback.
Unexpected recursion makes it much harder to write code to an API.
Received on Friday, 22 February 2013 17:28:58 UTC

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