forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: document ES2022's Error "cause" property
ES2022 adds an `options` parameter to the `Error` constructor. If the options argument contains a property named `cause`, the property's value is assigned to a non-enumerable property named `cause` on the newly created error. The `cause` property is not referenced anywhere else in the ES2022/2023 specifications. It is for error-formatting software like `util.inspect()` to consume. The `cause` property was added in V8 9.3, which was added to Node 16.9.0. Refs: https://tc39.es/ecma262/#sec-error-message Refs: https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V16.md#error-cause PR-URL: nodejs#43830 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
- Loading branch information
Showing
1 changed file
with
49 additions
and
2 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