function renderCallback(req, res, template) {
    return function(err, data) {
      if (err) {
        handleError(req, res, err);
      } else {
        render(req, res, template, data);
      }
    };
  }
function renderCallback(req, res, template) {
    return function(err, data) {
      if (err) {
        handleError(req, res, err);
      } else {
        render(req, res, template, data);
      }
    };
  }
function renderCallback ( req , res , template ) { return function ( err , data ) { if ( err ) { handleError ( req , res , err ) ; } else { render ( req , res , template , data ) ; } } ; }
Build a callback that renders on success or errors on failure
Build a callback that renders on success or errors on failure