Execute the next function in the chain. Receives the error and return values from the previous function.
160588
function exec() {

      // Extract error from arguments.
      var err = arguments[0];

      // Abort chain on error.
      if (err) {
        fn = cfn = null;
        done.apply(null, arguments);
        return;
      }

      // Terminate if there are no functions left in the chain.
      if (!fnList.length) {
        fn = cfn = null;
        done.apply(null, arguments);
        return;
      }

      // Advance to the next function in the chain.
      fn = fnList.shift();
      var _fn = fn;

      // Extract arguments to pass into the next function.
      var ret = Array.prototype.slice.call(arguments, 1);

      // Call next function with previous return value and call back exec.
      ret.push(exec);
      var _cfn = fn.apply(null, ret); // fn(null, ret..., exec)

      // Detect when fn has completed synchronously and do not clobber the
      // internal state in that case. You're not expected to understand this.
      if (_fn !== fn) {
        return;
      }

      // Remember the cancel method for the currently executing function.
      // Detect chaining on non-cancellable function.
      if (typeof _cfn !== 'function') {
        throw new Error('chain: chaining on non-cancellable function');
      } else {
        cfn = _cfn;
      }

    }
1206205
function(chain) {
      var method = status > 0 ? "resolve" :
                   status < 0 ? "reject" :
                   null;
      if (method) for (var i in chain) {
        chain[i][method](result);
      }
    }
1075020
function chainCallback(cb, next) {
    var browser = this;

    return function queueWrapped() {
        try {
            if (cb) {cb.apply(browser, arguments);}
            next();
        } catch (e) {
            next(e);
        }
    };
}
1229634
function(err) {
        if (err) this._onError(err);
        if (this._continueErrors || !err) {
            var args = [].slice.call(arguments);
            if (this._callbacks.length > 0) {
                this._isQueueRunning = true;
                var cb = this._callbacks.shift();
                cb = cb.bind(this);
                args = args.slice(1);
                args.push(this.next);
                cb.apply(this, args);

            } else {
                this._isQueueRunning = false;
                this.start = (function() {
                    this.start = null;
                    this.next.apply(this, args);
                }).bind(this);

            }
        }
        return this;
    }
1041396
def process_execute(function, *args, **kwargs):
    """"""
    try:
        return function(*args, **kwargs)
    except Exception as error:
        error.traceback = format_exc()
        return RemoteException(error, error.traceback)
290046
function chainStepsNoError() {
	var steps = slice.call(arguments).map(function(step) {
		return notHandlingError(step);
	});
	return chainSteps.apply(null, steps);
}
450812
function utilCallbackAfterPromise(self, func, args, cb) {
	args = Array.prototype.slice.apply(args);
	let lastarg = args.pop();
	if(!cb) cb = lastarg;
	func.apply(self, args).then(res => {
		try {
			cb(null, res);
		} catch(e) {
			process.nextTick(() => { throw e });
		}
	}).catch((err) => {
		try {
			cb(err);
		} catch(e) {
			process.nextTick(() => { throw e });
		}
	});
}
221010
function after(results, next) {
    item.trigger('after:' + method, function done(error) {
      next(error, results);
    });
  }
925190
function next(error) {
    if (error) return self.emit('error', error);
    if (++i === files.length) self.emit('optimized');
  }
671534
function next(err) {
			if(maxCalls != null && ++numCalls > maxCalls) {
				var newErr = new Error("stride: `this` was called more than " +
					maxCalls + " times!");
				if(err) {
					newErr.message += " Error passed to `this` on call #" + numCalls +
						": " + err.message;
					newErr.errorOnStep = err;
				}
				err = newErr;
			}
			//Process arguments
			if(err) {
				if(EventEmitter.listenerCount(emitter, "error") > 0) {
					process.nextTick(function() {
						emitter.emit("error", err);
					});
				}
				else if(EventEmitter.listenerCount(emitter, "done") === 0)
					process.nextTick(function() {
						// Warn the user that they aren't properly handling Stride errors
						err.message = "Uncaught exception within Stride: " + err.message;
						throw err; //Throw uncaught exception
					});
				if(!errorRaised) {
					emitDone(errorArgOnly ? [err] : arguments);
					errorRaised = true;
				}
			}
			if(!errorRaised) {
				//Call the next step
				if(index + 1 < steps.length) {
					//Remove first (error) argument
					var args;
					if(arguments.length > 0) {
						args = new Array(arguments.length - 1);
						for(var j = 0; j < args.length; j++)
							args[j] = arguments[j + 1];
					}
					else
						args = [];
					//Call the next step, catching any errors
					var thisStepsNext = getNext(index + 1);
					try {
						var result = steps[index + 1].apply(thisStepsNext, args);
						//Call next step if this step ran synchronously
						//and returned data
						if(result !== undefined) {
							thisStepsNext(null, result);
						}
					} catch(e) {
						thisStepsNext(e);
					}
					// Mark `thisStepsNext` as "synchronously complete"
					thisStepsNext._syncDone();
				}
				else {
					emitDone(arguments);
				}
			}
		}
1205098
function _try() {
            // Call function

            Q.invoke(f)
            .then(function(result) {
                // Success
                d.resolve(result);
            }, function(err) {
                // Failure

                // Decrement
                remainingTries -= 1;

                // No tries left, so reject promise with last error
                if(remainingTries >= 0 && canContinue(err, N - remainingTries)) {
                    // We have some retries left, so retryTimeout
                    if(retryTimeout) {
                        setTimeout(_try, retryTimeout);
                    } else {
                        _try();
                    }
                } else {
                    // Total failure
                    d.reject(err);
                    return;
                }
            }).done();
        }
1242966
def _errcheck(result, func, arguments):
    

    if result != 0:
        raise XdoException(
            'Function {0} returned error code {1}'
            .format(func.__name__, result))
    return None
1060440
def execute(self, *args, **kwargs):
        
        self.walk(*args, **kwargs)

        failed_steps = [step for step in self.steps if step.status == FAILED]
        if failed_steps:
            raise PlanFailed(failed_steps)
1314145
function noerror(/*...*/) { // function can be referenced within each task as this.noerror
            try { tasks.length ? tasks.shift().apply(funcs[0], arguments) : next.apply(this, [null].concat(Array.prototype.slice.call(arguments))) }
            catch (ex) { next(ex) } // return any thrown exception as the argument to next()
        }
215910
function onError(err) {
    if (!retries.length) return reject(err);
    setTimeout(()=>fn().then(resolve, onError), retries.shift());
  }
763754
def process(self):
        
        try:
            result = self._func(*self._args, **self._kwds)
        except:
            self._result._set_exception()
        else:
            self._result._set_value(result)
430906
function (cb) {
            if (cb) {
                if (isPromise(cb)) {
                    cb = cb.errback;
                }
                if (this.__fired && this.__error) {
                    this.__callNextTick(cb, this.__error);
                } else {
                    this.__errorCbs.push(cb);
                }
            }
            return this;
        }