generic Error handler MEANJS, mongoose, winston

so I've recently started programing in node and MEAN and while working with JAVA I would always focus on best pattern to create solid apps, and even though the learning curve is killing me I'm trying the same here. Anyway I'm trying to implement a generic error handler using MEANjs to have an exception handler in a central place, log errors to a file and send email when this happens.
starting with mongoose for example

app.route('/process/:pId').get(function(req, res){ 
  pModel.findById(req.params.pId, function(err, doc){
    if(err) {//this is so
       console.log(err);//repetitive so I would 
       res.send(500, 'Error: error.');
    }//like to send all these errors to a central handler like in express.js below 
    res.json(200, {data: doc});
  });
};);

this is the handler in express.js :

   app.use(function(err, req, res, next) {
      if (!err) return next();
      // can I call another error handlers at this level??
      console.error(err.stack);
      // Error page
      res.status(500).render('500', {  error: err.stack});
   });

so here is where it gets confusing since I'm trying to implemente a middleware with express I'm not sure if app.use is the best aproach, I've read that sometimes is not the best aproach, or this is just for Express 3.xx?? what about express 4? below is what I'm using for the logger file and then using it before the express error handler is this good practice or it should go inside the handler?

var logger = expressWinston.logger({
    transports:[
        new (winston.transports.File)({
            filename:'./app/log/winston.log',
            colorize: false,
            json: true
        })
    ],
    statusLevels:true,
    meta: true,
    msg: 'HTTP {{req.method}} {{req.url}}'
});

So landing this. is there a way to have a general errors handler via express 4 using MEANJS sending emails when they happen logging into a file. and get rid of all this repetitive mongoose errors handling keeping in mind best practices for MEANJS.

I can help you with my setup that I'm using after I did some investigation by inspecting the code of Ghost and Mongoose itself.

My workflow is making custom error class that look something like this ( actually I took the idea from mongoose custom errors .

var AppError = function (err) {
    var name = "Application Error", msg;
    if ( err instanceof Error ) { 
       msg = err.message;
       name = "Application Error [" + err.name + "]";
    } else {
       msg = err;
    }
    Error.call(this);
    Error.captureStackTrace(this, arguments.callee);
    this.message = msg;
    this.name = name;
    // Here is the interesting part
    console.log('An error occured', this);
    // Or even let's pretend smtp is our mail module
    smpt.send('admin@site.com', err);
}

By using this I always do something like :

dbUser.find(query, function(err, data) {
    if ( err ) return new AppError(err);
    // Do other stuff.
});

I improved more this code by using Promises. ( Actually I took this from source code of Ghost ).

Mongoose by default also support promises. So simply you do something like this :

var wrapError = function(res) { 
   return function(err) {
       new AppError(err);
       res.send(500, "Internal server error");
   };
}

And later in your query code

dbUser.find(query).exec().then( function(data) { console.log(data) }, wrapError(res) );

I hope this can help you figure it out further.