-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Summary The runtime has built-in support for ‘sub exceptions.’ You can read about it here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause > It is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error. This PR brings `cause` to `SolanaError` so that we can use it to rethrow errors under one umbrella error. Developers will have access to the inner error via `SolanaError#cause`. The first error that will make use of this is the websocket close error, in the next PR. # Test Plan ```shell pnpm turbo test:unit:node test:unit:browser ```
- Loading branch information
1 parent
8023370
commit 803b2d8
Showing
4 changed files
with
94 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
"lib": [ | ||
"DOM", | ||
"ES2015", | ||
"ES2022.Error" | ||
], | ||
"resolveJsonModule": true | ||
}, | ||
|