async.waterfall pass arguments to end #177

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@Mikxail
Mikxail commented Sep 13, 2012

async.waterfall pass arguments to end if some task finished with error

@Mikxail Mikxail async.waterfall pass arguments to end
async.waterfall pass arguments to end if some task finished with error
4dcb3c1
@Mikxail
Mikxail commented Sep 13, 2012

Without path:

async.waterfall([
    function(cb){
        cb('err', 'func 1');
    },
    function(v, cb){
        cb(null, 'func 2');
    }
],
function(err, results){
    console.log('-end-', arguments);
});
// result: -end- { '0': 'err' }

but

async.waterfall([
    function(cb){
        cb(null, 'func 1');
    },
    function(v, cb){
        cb('err2', 'func 2');
    }
],
function(err, results){
    console.log('-end-', arguments);
});
//result: -end- { '0': 'err2', '1': 'func 2' }
@jgornick

Please refer to PR #141.

@caolan
Owner
caolan commented Jan 31, 2013

merged #141 which covers this.

@caolan caolan closed this Jan 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment