Initial working new notify - needs sprucing up but working!
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user