- From: cowwoc <cowwoc@bbs.darktech.org>
- Date: Thu, 02 Oct 2014 02:25:18 -0400
- To: public-media-capture@w3.org
On 02/10/2014 2:15 AM, Eric Rescorla wrote: > Conveniently, we already agreed months ago that in WebRTC and gUM, > error callbacks are used for all runtime error reporting and exceptions > are used *solely* for programming errors (i.e., the kind of thing that > would > be a good candidate for compile-time failures and/or asserts in other > languages). Thus, this argument about exceptions is largely irrelevant, > leaving us with an argument about the relative aesthetic merits of > callback chains versus promises. > Hi Eric, A few months ago I thought this strategy made sense. Having used Promises for the past year I now believe that all exceptions (including those associated with programming errors) should get returned by the callbacks/promises. Exceptions thrown outside the callback/promise won't get caught by developers (who are lazy and won't bother catching exceptions in two different places). If all exceptions were tunneled over callbacks/promises, then unknown exceptions would typically get logged or otherwise presented to the user to pass on to the developer. Gili
Received on Thursday, 2 October 2014 06:26:37 UTC