lib/proto.js
function call(handle, route, err, req, res, next) {
  var arity = handle.length;
  var hasError = Boolean(err);

  debug('%s %s : %s', handle.name || '<anonymous>', route, req.originalUrl);

  try {
    if (hasError && arity === 4) {
      // error-handling middleware
      handle(err, req, res, next);
      return;
    } else if (!hasError && arity < 4) {
      // request-handling middleware
      handle(req, res, next);
      return;
    }
  } catch (e) {
    // reset the error
    err = e;
  }

  // continue
  next(err);
}
function call(handle, route, err, req, res, next) {
  var arity = handle.length;
  var hasError = Boolean(err);

  debug('%s %s : %s', handle.name || '<anonymous>', route, req.originalUrl);

  try {
    if (hasError && arity === 4) {
      // error-handling middleware
      handle(err, req, res, next);
      return;
    } else if (!hasError && arity < 4) {
      // request-handling middleware
      handle(req, res, next);
      return;
    }
  } catch (e) {
    // reset the error
    err = e;
  }

  // continue
  next(err);
}
function call ( handle , route , err , req , res , next ) { var arity = handle . length ; var hasError = Boolean ( err ) ; debug ( '%s %s : %s' , handle . name || '<anonymous>' , route , req . originalUrl ) ; try { if ( hasError && arity === 4 ) { // error-handling middleware handle ( err , req , res , next ) ; return ; } else if ( ! hasError && arity < 4 ) { // request-handling middleware handle ( req , res , next ) ; return ; } } catch ( e ) { // reset the error err = e ; } // continue next ( err ) ; }
Invoke a route handle.

@api private
Invoke a route handle .