This commit is contained in:
2020-04-04 19:39:59 +00:00
parent 823b1aa7e5
commit 977b313fcf
12 changed files with 46 additions and 58 deletions

View File

@@ -1,6 +1,4 @@
/* xeslint-disable */
let devModeShowErrors = false;
let lastMessageHash = 0;
////////////////////////////////////////////////////////
@@ -21,11 +19,11 @@ function dealWithError(msg, vm) {
//In some cases the error may not be translatable, if this is not a debug run then it should show without the ?? that translating puts in keys not found
//so it's not as weird looking to the user
if (!devModeShowErrors && msg.includes("??")) {
if (!vm.$ay.dev && msg.includes("??")) {
msg = msg.replace("??", "");
}
window.$gz.store.commit("logItem", msg);
if (devModeShowErrors) {
if (vm.$ay.dev) {
let errMsg =
"DEV ERROR errorHandler::devShowUnknownError - unexpected error: \r\n" +
msg;
@@ -54,12 +52,6 @@ function dealWithError(msg, vm) {
}
}
export default {
developmentModeShowErrorsImmediately(showErrorsImmediately) {
devModeShowErrors = showErrorsImmediately;
},
devMode() {
return devModeShowErrors;
},
handleGeneralError(message, source, lineno, colno, error) {
let msg = "General error: \n" + message;
if (source) {