This commit is contained in:
2020-11-26 19:46:52 +00:00
parent f26579103e
commit 649e817086
10 changed files with 75 additions and 33 deletions

View File

@@ -32,7 +32,7 @@ function dealWithError(msg, vm) {
let errMsg = "DEV MODE errorHandler.js:: Unexpected error: \r\n" + msg;
// eslint-disable-next-line no-console
console.error(errMsg);
//console.trace();
//debugger;
}
@@ -68,8 +68,16 @@ function dealWithError(msg, vm) {
// and return human readable text
//
function decodeError(e, vm) {
// console.log("decodeError The e object is an object:");
// //console.log(JSON.stringify(e));
// console.log(typeof e === "object");
//empty?
if (e == null || e == "") {
if (
e == null ||
e == "" ||
(typeof e === "object" && Object.keys(e).length === 0)
) {
return "errorHandler::decodeError - Error is unknown / empty";
}