This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user