Log unconditionally uncaughtException and unhandledRejection in
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 16 Sep 2022 17:16:31 +0000 (19:16 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 16 Sep 2022 17:16:31 +0000 (19:16 +0200)
worker

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStationWorker.ts

index 4f109bf5023206c826e55f880c278d576ccaafa3..73c2cb7f71dc30678cc802a22d7d1da8b56c23d4 100644 (file)
@@ -49,3 +49,11 @@ function startChargingStation(data: ChargingStationWorkerData): void {
   const station = new ChargingStation(data.index, data.templateFile);
   station.start();
 }
+
+process.on('uncaughtException', (err) => {
+  throw err;
+});
+
+process.on('unhandledRejection', (reason) => {
+  throw reason;
+});