Kevin Smith (2013-04-18T16:14:35.000Z)
>  Also, can someone point me to a real-world example of delayed rejection
>> handling?
>>
> What do you mean by "delayed"? If that is: a promise has been rejected and
> someone later add a .fail/.catch handler to it, then I've never done that
> personally.


Yes, that's what I mean.  Specifically, a real-world example where the
rejection handler is added in "some future turn", using a fuzzy definition
of that phrase.  A contrived example would be:

    // Create a future and get the resolver
    let resolver, future = new Future(r => resolver = r);

    // Reject it
    resolver.reject("error");

    // Attach a rejection handler 5 seconds later
    setTimeout(() => future.then(null, err => null), 5000);

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130418/517696dd/attachment.html>
github at esdiscuss.org (2013-07-12T02:26:56.861Z)
>> Also, can someone point me to a real-world example of delayed rejection handling?
>
> What do you mean by "delayed"? If that is: a promise has been rejected and someone later add a .fail/.catch handler to it, then I've never done that personally.


Yes, that's what I mean.  Specifically, a real-world example where the
rejection handler is added in "some future turn", using a fuzzy definition
of that phrase.  A contrived example would be:

```js
// Create a future and get the resolver
let resolver, future = new Future(r => resolver = r);

// Reject it
resolver.reject("error");

// Attach a rejection handler 5 seconds later
setTimeout(() => future.then(null, err => null), 5000);
```