W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

Re: Future feedback

From: Sean Hogan <shogun70@westnet.com.au>
Date: Wed, 15 May 2013 09:19:36 +1000
Message-ID: <5192C688.40109@westnet.com.au>
To: David Bruant <bruant.d@gmail.com>
CC: public-script-coord@w3.org
On 14/05/13 10:29 PM, David Bruant wrote:

>>> The purpose of done is to avoid a to chain so that uncaught errors 
>>> aren't propagated without being caught. When you call .done and the 
>>> last promise had an error, the devtools can tell you so (telling you 
>>> before .done could be confusing as the error might be later caught)
>>>
>>
>> `.done()` **does not** provide a guarantee against silent failure.
> It does in the Q library. It will also with native support in 
> combination with devtools.
>


I can't see how the current spec supports that.
Are you saying devtools will do something like the following?

Future.prototype._done = Future.prototype.done;
Future.prototype.done = function(acceptCB, rejectCB) {
     this._done(null, function(err) { throw err; });
     this._done(acceptCB, rejectCB);
}
Received on Tuesday, 14 May 2013 23:20:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC