Pollenware/comb — pull request #20 by dtymon (2012-08-08 05:06:21+00:00)
Title: Add variant of chain() that propagates errors to next link

A variant of chain() that propagates errors to the next link in the chain if no explicit errback is passed. This allows for centralised error handling by using the following pattern:

this.task1()
.chainPropagateErr(hitch(this, 'task2'))
.chainPropagateErr(hitch(this, 'task3'))
.chainPropagateErr(hitch(this, 'task4'))
.then(
function () {
// Success
},
function (err) {
// A task failed
}
);

This pattern is very handy for situations like updating numerous database tables.