From 5a6bab3beacdd3b357e7e624c37e4e414d493f6f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 28 Jan 2024 19:00:02 +0100 Subject: [PATCH] refactor: do not regenerate error stack strace needlessly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/exception/BaseError.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/exception/BaseError.ts b/src/exception/BaseError.ts index ce37fd98..4a94fc26 100644 --- a/src/exception/BaseError.ts +++ b/src/exception/BaseError.ts @@ -6,8 +6,5 @@ export class BaseError extends Error { this.name = new.target.name this.date = new Date() Object.setPrototypeOf(this, new.target.prototype) - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, BaseError) - } } } -- 2.34.1