1
0

Improve logging

This commit is contained in:
2023-08-15 07:14:35 +02:00
parent 1e55116cc0
commit 946c7fe337

View File

@@ -27,6 +27,9 @@ function compare(a, b, operator) {
case '>=':
returnValue = a.greaterThanOrEqual(b);
break;
default:
console.error(`${operator} is no valid operator`);
return;
}
} catch(e) {
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;
}