Improve logging
This commit is contained in:
@@ -27,6 +27,9 @@ function compare(a, b, operator) {
|
|||||||
case '>=':
|
case '>=':
|
||||||
returnValue = a.greaterThanOrEqual(b);
|
returnValue = a.greaterThanOrEqual(b);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
console.error(`${operator} is no valid operator`);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
logMsg = `Standard comparison of ${a}, ${b} with operator ${operator}`;
|
logMsg = `Standard comparison of ${a}, ${b} with operator ${operator}`;
|
||||||
@@ -52,12 +55,7 @@ function compare(a, b, operator) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (returnValue == undefined) {
|
|
||||||
console.error(`${operator} is no valid operator`);
|
|
||||||
} else {
|
|
||||||
console.debug(logMsg);
|
console.debug(logMsg);
|
||||||
}
|
|
||||||
|
|
||||||
return returnValue;
|
return returnValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user