Fix isEmptyString() semantic
[e-mobility-charging-stations-simulator.git] / src / worker / WorkerUtils.ts
index 00feba445ff939cbc933eac0daf1a12fc0cfb4c4..2b6123514633799c668060ff755e4d7a645394a7 100644 (file)
@@ -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));
+  };
 }