From: Jérôme Benoit Date: Fri, 16 Sep 2022 17:42:12 +0000 (+0200) Subject: Simplify WorkerUtils.defaultErrorHandler usage in WorkerSet X-Git-Tag: v1.1.74~30 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f6d765e42ad09276f21dfedceacb1473b9addc31;p=e-mobility-charging-stations-simulator.git Simplify WorkerUtils.defaultErrorHandler usage in WorkerSet Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/WorkerSet.ts b/src/worker/WorkerSet.ts index 2fed62f5..1da58e9e 100644 --- a/src/worker/WorkerSet.ts +++ b/src/worker/WorkerSet.ts @@ -96,9 +96,7 @@ export default class WorkerSet extends WorkerAbstract { /* This is intentional */ }); }); - worker.on('error', (error) => { - WorkerUtils.defaultErrorHandler(error); - }); + worker.on('error', WorkerUtils.defaultErrorHandler); worker.on('exit', (code) => { WorkerUtils.defaultExitHandler(code); this.workerSet.delete(this.getWorkerSetElementByWorker(worker));