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