add uncaught exception handling
This commit is contained in:
parent
6c4a81e679
commit
8c670a92b5
2 changed files with 10 additions and 0 deletions
|
|
@ -1337,4 +1337,13 @@ process.on('SIGHUP', function(sig, code) {
|
|||
processExit(code);
|
||||
});
|
||||
|
||||
process.on('unhandledRejection', (reason, p) => {
|
||||
logger.log({unhandled_rejection: reason, promise: p});
|
||||
});
|
||||
|
||||
process.on('uncaughtException', (err) => {
|
||||
logger.log({uncaught_exception: err});
|
||||
// process.exit(1);
|
||||
});
|
||||
|
||||
processLoad();
|
||||
|
|
|
|||
Loading…
Reference in a new issue