Home:ALL Converter>Which error will be handled by express error and which by uncaughtException error handler?

Which error will be handled by express error and which by uncaughtException error handler?

Ask Time:2015-11-05T17:46:33         Author:thelonglqd

Json Formatter

In my services using express nodejs. I knew about the express error handler, the callback function with err first

app.use(function(err, req, res, next)

And We can handle the uncaughtException also by

process.on('uncaughtException', function(err) {}

In fact, some uncaughtException will go to express error handler not uncaughtException handler.

Please help to tell me which error will be handled by express, which by uncaughtException handler?

Many thanks

Author:thelonglqd,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/33541217/which-error-will-be-handled-by-express-error-and-which-by-uncaughtexception-erro
yy