Skip to content

Commit

Permalink
Don't catch all errors on modal
Browse files Browse the repository at this point in the history
  • Loading branch information
dlaxcess committed Oct 25, 2024
1 parent 9694a23 commit 56256dc
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions svelte/src/components/Global/AlertModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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;
// };
}
});
Expand Down

0 comments on commit 56256dc

Please sign in to comment.