-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: migrate to Typescript target of ES2022 and use Error.cause
Project-wide upgrade to Typescript target of ES2022 so that we can use the new Error APIs. Wherever possible we should now use the new `cause` property of the built-in `Error` type in combination with the `asError(unknown)` utility function: ```typescript import { asError } from "@hyperledger/cactus-common"; try { await performSomeImportantOperation(); } catch (ex: unknown) { const cause = asError(ex); throw new Error("Something went wrong while doing something.", { cause }); } ``` More information about the EcmaScript proposal that made this possible: https://github.com/tc39/proposal-error-cause Fixes #3592 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Loading branch information
Showing
5 changed files
with
46 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters