X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FBootstrap.ts;h=10344b5130026e4eb791758d13089eb294d5272b;hb=9c7195b209ec5072ba96581f7c2a30314c59fb76;hp=36d694e761de04b901b5c2c3353069c4bebaaf07;hpb=c63c21bce46d9230688d0c5ebd31f5dd861324de;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 36d694e7..10344b51 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -72,6 +72,8 @@ export default class Bootstrap { } catch (error) { console.error(chalk.red('Bootstrap start error '), error); } + } else { + console.error(chalk.red('Cannot start an already started charging stations simulator')); } } @@ -79,6 +81,8 @@ export default class Bootstrap { if (isMainThread && this.started) { await Bootstrap.workerImplementation.stop(); await Bootstrap.storage.close(); + } else { + console.error(chalk.red('Trying to stop the charging stations simulator while not started')); } this.started = false; }