From: Jérôme Benoit Date: Mon, 14 Aug 2023 19:07:45 +0000 (+0200) Subject: refactor: cleanup worker catch clause X-Git-Tag: v2.6.26~30 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7c8ac84e422da5a4c4418b6f69094ade5ee4ff1a;p=poolifier.git refactor: cleanup worker catch clause Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 56a7696f..5a61f1cf 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -344,7 +344,7 @@ export abstract class AbstractWorker< // eslint-disable-next-line @typescript-eslint/no-invalid-void-type this.opts.killHandler?.() as void this.sendToMainWorker({ kill: 'success', workerId: this.id }) - } catch (error) { + } catch { this.sendToMainWorker({ kill: 'failure', workerId: this.id }) } finally { this.emitDestroy()