X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2FWorkerUtils.ts;h=2b6123514633799c668060ff755e4d7a645394a7;hb=29405d4fc27d01f8186482c0826b290152d027fe;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..2b612351 100644 --- a/src/worker/WorkerUtils.ts +++ b/src/worker/WorkerUtils.ts @@ -7,7 +7,11 @@ export class WorkerUtils { public static defaultExitHandler = (code: number): void => { if (code !== 0) { - console.error(chalk.red(`Worker stopped with exit code ${code}`)); + console.error(chalk.red(`Worker exited with error exit code: ${code.toString()}`)); } }; + + public static defaultErrorHandler = (error: Error): void => { + console.error(chalk.red('Worker errored: ', error)); + }; }