Initial working new notify - needs sprucing up but working!

This commit is contained in:
2019-11-06 23:25:24 +00:00
parent c65f99fa75
commit d8c0d73597
12 changed files with 278 additions and 49 deletions

View File

@@ -1,4 +1,4 @@
/* eslint-disable */
/* xeslint-disable */
var devModeShowErrors = false;
@@ -7,10 +7,10 @@ var devModeShowErrors = false;
// Localize, Log and optionally display errors
// return localized message in case caller needs it
function dealWithError(msg, vm) {
debugger;
//debugger;
msg = window.$gz.locale.translateString(msg);
//In some cases the error may not be localizable, if this is not a debug run then it should show without the ?? that localizing puts in keys not found
//so it's not as wierd looking to the user
//so it's not as weird looking to the user
if (!devModeShowErrors && msg.includes("??")) {
msg = msg.replace("??", "");
}
@@ -20,8 +20,7 @@ function dealWithError(msg, vm) {
var errMsg =
"DEV ERROR errorHandler::devShowUnknownError - unexpected error: \r\n" +
msg;
//eslint-disable-next-line
console.log(errMsg);
window.$gz.eventBus.$emit("notify-error", errMsg);
}