From: Jérôme Benoit Date: Thu, 9 Dec 2021 10:27:28 +0000 (+0100) Subject: Try to propagate error on configuration file reload. X-Git-Tag: v1.1.40~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=dcaf96dceb56a3ca655ca67dc106ced2b6aaaca1;p=e-mobility-charging-stations-simulator.git Try to propagate error on configuration file reload. Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index 2e8ef2e9..8311d5d8 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -199,7 +199,9 @@ export default class Configuration { // Nullify to force configuration file reading Configuration.configuration = null; if (!Configuration.isUndefined(Configuration.configurationChangeCallback)) { - Configuration.configurationChangeCallback().catch(() => { /* This is intentional */ }); + Configuration.configurationChangeCallback().catch((error) => { + throw typeof error === 'string' ? new Error(error) : error; + }); } } });