Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd catch to promise objects #2102
Comments
|
I can see us creating |
|
of course, this would need to be done with |
|
Giant +1 on this. Since these Promises aren't based on a prototype, it's much easier for this to be supported internally rather than having to do something like wrap the constructor and decorate the returned promise. |
|
I updated the title for accuracy. Suggested implementation: "catch": function( fn ) {
return promise.then( null, fn );
} |
|
Sounds like a blocker to me |
This relates to #1722 but a far simpler request... given that the
.thenmethod matches the Promise spec (with the extra progress parameter), it would be nice that there be a compatible.catchmethod... (per @dmethvin) this could call and return.then(null,fn)as a passthrough.