diff --git a/emain/emain.ts b/emain/emain.ts index 34f37fb0e..9f47b4033 100644 --- a/emain/emain.ts +++ b/emain/emain.ts @@ -997,8 +997,9 @@ process.on("uncaughtException", (error) => { if (caughtException) { return; } - logger.error("Uncaught Exception, shutting down: ", error); caughtException = true; + console.log("Uncaught Exception, shutting down: ", error); + console.log("Stack Trace:", error.stack); // Optionally, handle cleanup or exit the app electronApp.quit(); }); @@ -1033,12 +1034,6 @@ async function relaunchBrowserWindows(): Promise { } } -process.on("uncaughtException", (error) => { - console.error("Uncaught Exception:", error); - console.error("Stack Trace:", error.stack); - electron.app.quit(); -}); - async function appMain() { // Set disableHardwareAcceleration as early as possible, if required. const launchSettings = getLaunchSettings();