Closed johnyanarella closed 11 years ago
This feature and its associated unit tests have been implemented in the promises_aplus
branch and will be part of the Deft JS 0.9 release.
Deft.Promise::done() is now available as part of the new Promises/A+ compliant rewrite of Deft JS's Promises.
See also: #82
One of the pitfalls of interacting with Promise-based APIs is the tendency for important errors to be silently swallowed unless an explicit rejection handler is specified.
For example:
Q.js addresses this issue by introducing a done() method that terminates a chain of Promises, forcing subsequent rejections to be thrown as exceptions.
The done() method ensures that unhandled rejections are rethrown.