From: Jérôme Benoit Date: Tue, 23 May 2023 08:34:08 +0000 (+0200) Subject: refactor: improve error logging X-Git-Tag: v1.2.14~21 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7f77d16f956cd81a026a042ed440aaaba37b1c56;p=e-mobility-charging-stations-simulator.git refactor: improve error logging Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 0851c41a..35d40ece 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -2180,7 +2180,9 @@ export class ChargingStation { if (Utils.isNotEmptyString(configuredSupervisionUrl)) { return new URL(configuredSupervisionUrl); } - throw new BaseError('No supervision urls configured'); + const errorMsg = 'No supervision url configured'; + logger.error(`${this.logPrefix()} ${errorMsg}`); + throw new BaseError(`${errorMsg}`); } private stopHeartbeat(): void {