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

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