This commit is contained in:
2020-04-02 14:05:29 +00:00
parent bb5a20a374
commit 7f947c23ef

View File

@@ -1,7 +1,7 @@
/* xeslint-disable */
var devModeShowErrors = false;
var lastMessageHash = 0;
let devModeShowErrors = false;
let lastMessageHash = 0;
////////////////////////////////////////////////////////
//
@@ -10,7 +10,7 @@ var lastMessageHash = 0;
function dealWithError(msg, vm) {
//Check if this is the same message again as last time to avoid
//repetitive loops of useless messages
var newHash = window.$gz.util.quickHash(msg);
let newHash = window.$gz.util.quickHash(msg);
if (newHash == lastMessageHash) {
return;
}
@@ -26,7 +26,7 @@ function dealWithError(msg, vm) {
}
window.$gz.store.commit("logItem", msg);
if (devModeShowErrors) {
var errMsg =
let errMsg =
"DEV ERROR errorHandler::devShowUnknownError - unexpected error: \r\n" +
msg;
// eslint-disable-next-line no-console
@@ -61,7 +61,7 @@ export default {
return devModeShowErrors;
},
handleGeneralError(message, source, lineno, colno, error) {
var msg = "General error: \n" + message;
let msg = "General error: \n" + message;
if (source) {
msg += "\nsource: " + source;
}
@@ -77,7 +77,7 @@ export default {
dealWithError(msg);
},
handleVueError(err, vm, info) {
var msg = "Vue error: \n" + err;
let msg = "Vue error: \n" + err;
if (err.fileName) {
msg += "\nfilename: " + err.fileName;
}
@@ -93,7 +93,7 @@ export default {
dealWithError(msg);
},
handleVueWarning(wmsg, vm, trace) {
var msg = "Vue warning: \n" + wmsg;
let msg = "Vue warning: \n" + wmsg;
// if (vm) {
// msg += "\nvm present ";
// }
@@ -112,7 +112,7 @@ export default {
dealWithError(err.message, vm);
} else {
//TODO: this is pretty bad
var msg = JSON.stringify(err);
let msg = JSON.stringify(err);
dealWithError(msg, vm);
}
}