Improve logging
This commit is contained in:
@@ -4,10 +4,10 @@ console.log('Load lib module');
|
||||
|
||||
function compare(a, b, operator) {
|
||||
// Hint: a = currentState, b = targetState
|
||||
let logMsg = a + ', ' + b + ' with operator ' + operator;
|
||||
let logMsg = '';
|
||||
let returnValue = undefined;
|
||||
try {
|
||||
logMsg = 'Quantity comparison of ' + logMsg;
|
||||
logMsg = 'Quantity comparison of ' + a + ', ' + b + ' with operator ' + operator;
|
||||
switch (operator) {
|
||||
case '==':
|
||||
returnValue = a.equal(b);
|
||||
@@ -29,7 +29,7 @@ function compare(a, b, operator) {
|
||||
break;
|
||||
}
|
||||
} catch(e) {
|
||||
logMsg = 'Standard comparison of ' + logMsg;
|
||||
logMsg = 'Standard comparison of ' + a + ', ' + b + ' with operator ' + operator;
|
||||
switch (operator) {
|
||||
case '==':
|
||||
returnValue = (a == b);
|
||||
|
||||
Reference in New Issue
Block a user