Update to exit app when an uncaughtException occured.

This commit is contained in:
Cheng-Han, Wu 2016-05-10 09:37:41 +08:00
parent 8e8a5e1ecb
commit f18ce47a3d

3
app.js
View file

@ -473,5 +473,8 @@ models.sequelize.sync().then(startListen);
// log uncaught exception // log uncaught exception
process.on('uncaughtException', function (err) { process.on('uncaughtException', function (err) {
logger.error('An uncaught exception has occured.');
logger.error(err); logger.error(err);
logger.error('Process will exit now.');
process.exit(1);
}); });