Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document ES2022's Error "cause" property #43830

Merged
merged 4 commits into from
Jul 16, 2022

Commits on Jul 14, 2022

  1. 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
    ide committed Jul 14, 2022
    Configuration menu
    Copy the full SHA
    9683efb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e747171 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2022

  1. doc: second round of rewording

    ide committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    3e00efe View commit details
    Browse the repository at this point in the history
  2. doc: reword when cause is set

    ide committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    f6375a1 View commit details
    Browse the repository at this point in the history