X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2FWorkerUtils.ts;h=4d6868f76f35cf77166cfcff54c7e23ccae0036d;hb=192927e0a96e35e9d302b3ce845a2db99f19e9df;hp=00feba445ff939cbc933eac0daf1a12fc0cfb4c4;hpb=9c5d9fa4cd1904b5e2d4c4a8277bed25865b61b6;p=e-mobility-charging-stations-simulator.git diff --git a/src/worker/WorkerUtils.ts b/src/worker/WorkerUtils.ts index 00feba44..4d6868f7 100644 --- a/src/worker/WorkerUtils.ts +++ b/src/worker/WorkerUtils.ts @@ -10,4 +10,8 @@ export class WorkerUtils { console.error(chalk.red(`Worker stopped with exit code ${code}`)); } }; + + public static defaultErrorHandler = (error: Error): void => { + console.error(chalk.red('Worker errored: ', error)); + }; }