diff options
author | Cheng-Han, Wu | 2016-05-10 09:37:41 +0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-05-10 09:37:41 +0800 |
commit | f18ce47a3d33aa5355d0209882fcc94ad6a30803 (patch) | |
tree | 8516f03893a5f12bdbb78d6deb9402618cbb9314 | |
parent | 8e8a5e1ecb37f1464b8d7c688a220e2d1436476f (diff) |
Update to exit app when an uncaughtException occured.
-rw-r--r-- | app.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -473,5 +473,8 @@ models.sequelize.sync().then(startListen); // log uncaught exception process.on('uncaughtException', function (err) { + logger.error('An uncaught exception has occured.'); logger.error(err); + logger.error('Process will exit now.'); + process.exit(1); });
\ No newline at end of file |