mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Write to error log on unhandled rejection/exception
This commit is contained in:
parent
0cdcac4cd2
commit
6e19a650d2
1 changed files with 9 additions and 0 deletions
|
@ -156,4 +156,13 @@ if (!module.parent) {
|
|||
})
|
||||
}
|
||||
|
||||
process
|
||||
.on('unhandledRejection', (reason, p) => {
|
||||
logger.err(reason, 'Unhandled Rejection at Promise', p)
|
||||
})
|
||||
.on('uncaughtException', err => {
|
||||
logger.err(err, 'Uncaught Exception thrown')
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
module.exports = app
|
||||
|
|
Loading…
Reference in a new issue