Handle exceptions, and prevent crashing from unhandled exceptions

This commit is contained in:
Ajay
2023-07-24 21:25:18 -04:00
parent 4e93a007c2
commit f63fa09605
17 changed files with 358 additions and 275 deletions

View File

@@ -10,7 +10,11 @@ async function init() {
process.on("unhandledRejection", (error: any) => {
// eslint-disable-next-line no-console
console.dir(error?.stack);
process.exit(1);
});
process.on("uncaughtExceptions", (error: any) => {
// eslint-disable-next-line no-console
console.dir(error?.stack);
});
try {