mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 13:37:01 +03:00
Handle exceptions, and prevent crashing from unhandled exceptions
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user