This commit is contained in:
2020-09-16 17:04:37 +00:00
parent 7b18f4e270
commit 3dc5f8134c
4 changed files with 73 additions and 52 deletions

View File

@@ -62,7 +62,7 @@ import chartBarHorizontalControl from "./components/chart-bar-horizontal-control
//DEVELOPMENT MODE
//THIS SHOULD BE FALSE IN RELEASE
//************************************************************
const DEV_MODE = true;
const DEV_MODE = false;
//************************************************************
//**************************************************************
//**************************************************************
@@ -105,6 +105,14 @@ window.$gz = {
Vue.config.errorHandler = errorHandler.handleVueError;
window.onerror = errorHandler.handleGeneralError;
//unhandled rejection handler here
window.addEventListener("unhandledrejection", function(event) {
// the event object has two special properties:
alert(event.promise); // [object Promise] - the promise that generated the error
alert(event.reason); // Error: Whoops! - the unhandled error object
});
//warnings, only occur by default in debug mode not production
Vue.config.warnHandler = errorHandler.handleVueWarning;