From: Jérôme Benoit Date: Sun, 29 Aug 2021 14:46:22 +0000 (+0200) Subject: Avoid useless casting at error handling X-Git-Tag: v2.2.0~28 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c8d883806c74b85db4f68d2df035bf0b49b75254;p=poolifier.git Avoid useless casting at error handling Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 8dcaa4c4..e97c0347 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -146,7 +146,7 @@ export abstract class AbstractWorker< * @returns Message of the error. */ protected handleError (e: Error | string): string { - return (e as unknown) as string + return e.toString() } /**