feat(app): handle unhandled exception & rejection
This commit is contained in:
parent
0a29237732
commit
9abb4b654d
|
@ -28,3 +28,11 @@ server.listen(port, () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
startWebSocketServer(server);
|
startWebSocketServer(server);
|
||||||
|
|
||||||
|
process.on('uncaughtException', (err, origin) => {
|
||||||
|
logger.error(`Uncaught Exception at ${origin}: ${err}`)
|
||||||
|
})
|
||||||
|
|
||||||
|
process.on('unhandledRejection', (reason, promise) => {
|
||||||
|
logger.error(`Unhandled Rejection at: ${promise}, reason: ${reason}`)
|
||||||
|
})
|
Loading…
Reference in New Issue