caolan/highland

Handle unhandled errors inside stream

ferronrsmith opened this issue · 0 comments

_([1, 2, 3]).consume(function (err, x, push, next) {
    callToSomeLibraryThatFails();
    if (x === _.nil) {
        push(err, x);
    } else {
            push(err, x);
            next();
    }
});

is there someway to handle an error that might occur inside the stream that prevents the err from being pushed ?