function then(onSuccess) {
            var _onSuccess = this._normalizeSuccess(onSuccess);
            return this.add(function onSuccessTask(err, res, next) {
                if (err) {
                    // pass this error to next task
                    next(err);
                } else {
                    // call onSuccess
                    _onSuccess(res, next);
                }
            });
        }
function then(onSuccess) {
            var _onSuccess = this._normalizeSuccess(onSuccess);
            return this.add(function onSuccessTask(err, res, next) {
                if (err) {
                    
                    next(err);
                } else {
                    
                    _onSuccess(res, next);
                }
            });
        }
function then ( onSuccess ) { var _onSuccess = this . _normalizeSuccess ( onSuccess ) ; return this . add ( function onSuccessTask ( err , res , next ) { if ( err ) { // pass this error to next task next ( err ) ; } else { // call onSuccess _onSuccess ( res , next ) ; } } ) ; }
前のタスクがエラーなく成功した場合のみ呼ばれるタスクを追加します
@memberof Bucks
@instance
@param {Function} onSuccess `onSuccess(res, next)`. `next(err, res)`
@throws {Error} args length invalid
@return {Bucks}
前のタスクがエラーなく成功した場合のみ呼ばれるタスクを追加します