Add error handlers to catch uncaugth errors
This commit is contained in:
12
ui/app.js
12
ui/app.js
@@ -284,6 +284,18 @@ function initializeClient() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
console.log("Currently in Development environment");
|
||||||
|
|
||||||
|
window.addEventListener("unhandledrejection", function(e) {
|
||||||
|
console.error("Error:", e);
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener("error", function(e) {
|
||||||
|
console.error("Error:", e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
landingRoot.parentNode.removeChild(landingRoot);
|
landingRoot.parentNode.removeChild(landingRoot);
|
||||||
|
|
||||||
let normalRoot = document.createElement("div");
|
let normalRoot = document.createElement("div");
|
||||||
|
|||||||
Reference in New Issue
Block a user