mirror of https://github.com/status-im/codimd.git
Update to exit app when an uncaughtException occured.
This commit is contained in:
parent
8e8a5e1ecb
commit
f18ce47a3d
3
app.js
3
app.js
|
@ -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);
|
||||||
});
|
});
|
Loading…
Reference in New Issue