fix: Add uncaught exceptions log

This commit is contained in:
Faruk AYDIN
2022-05-12 23:17:05 +02:00
parent 8c9bf9c7ef
commit 7787436fd4

View File

@@ -1,2 +1,11 @@
import './config/orm'; import './config/orm';
import './workers/processor'; import './workers/processor';
process
.on('unhandledRejection', (reason, p) => {
console.error(reason, 'Unhandled Rejection at Promise', p);
})
.on('uncaughtException', (err) => {
console.error(err, 'Uncaught Exception thrown');
process.exit(1);
});