From 842a32514bfd29329e0939ae6b36e8eaa18fae8f Mon Sep 17 00:00:00 2001 From: Vasilii Rogin Date: Sun, 17 Nov 2024 16:24:24 +0200 Subject: [PATCH] Show error in console --- os/web/index.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/os/web/index.mjs b/os/web/index.mjs index 1ae248b8..5ef6188e 100644 --- a/os/web/index.mjs +++ b/os/web/index.mjs @@ -14,14 +14,16 @@ import { registerServiceWorker } from "./service_worker_manager.mjs"; window.addEventListener("error", (err) => { console.info("error", err); + console.info( + `Error is: ${err.error?.name}: ${err.error?.message} ${err.error?.stack}` + ); setErrorState(err.error); }); window.addEventListener("unhandledrejection", (err) => { console.info("unhandledrejection", err); console.info( - `reason ${err.reason?.name}: ${err.reason?.message} ${err.reason?.stack}` + `Reason is: ${err.reason?.name}: ${err.reason?.message} ${err.reason?.stack}` ); - //console.info(`error ${err.promise?.name}: ${err.error?.message} ${err.error?.stack}`); }); initializeGlobalModuleObject();