refactor: do not regenerate error stack strace needlessly
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 28 Jan 2024 18:00:02 +0000 (19:00 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 28 Jan 2024 18:00:02 +0000 (19:00 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/exception/BaseError.ts

index ce37fd98d96df2e88f82eb191e85112db0ad6a4f..4a94fc26fd24bf952331c5a7cbb52bead8fdc0e7 100644 (file)
@@ -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)
-    }
   }
 }