From 56256dc32d873b8d6408dd21b2b2ad782eca85ad Mon Sep 17 00:00:00 2001 From: dlaxcess Date: Fri, 25 Oct 2024 15:35:23 +0200 Subject: [PATCH] Don't catch all errors on modal --- .../src/components/Global/AlertModal.svelte | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/svelte/src/components/Global/AlertModal.svelte b/svelte/src/components/Global/AlertModal.svelte index f448a6fc..84d7a15b 100644 --- a/svelte/src/components/Global/AlertModal.svelte +++ b/svelte/src/components/Global/AlertModal.svelte @@ -30,22 +30,22 @@ }); // Global Error Listener for Uncaught Exceptions - window.onerror = function (message, source, lineno, colno, error) { - // console.log("Global error:", { message, source, lineno, colno, error }); - status = "error"; - title = `${error?.name}`; - alertMsg = error?.message || ""; - open = true; - }; - - // Global Listener for Unhandled Promise Rejections - window.onunhandledrejection = function (event) { - console.log("Unhandled rejection:", event); - status = "error"; - title = `Unhandled rejection #${event.reason.code}`; - alertMsg = event.reason.message; - open = true; - }; + // window.onerror = function (message, source, lineno, colno, error) { + // // console.log("Global error:", { message, source, lineno, colno, error }); + // status = "error"; + // title = `${error?.name}`; + // alertMsg = error?.message || ""; + // open = true; + // }; + + // // Global Listener for Unhandled Promise Rejections + // window.onunhandledrejection = function (event) { + // console.log("Unhandled rejection:", event); + // status = "error"; + // title = `Unhandled rejection #${event.reason.code}`; + // alertMsg = event.reason.message; + // open = true; + // }; } });