镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

arguments property of ReferenceError instance? #11558

Description

@vsemozhetbyt
  • Version:
  • Platform: Windows 7 x64
  • Subsystem: doc, errors

errors.md states:

ReferenceError instances will have an error.arguments property whose value is an array containing a single element: a string representing the variable that was not defined.

However, it seems this property does not exixst anymore in the actual Node.js versions:

try {
  doesNotExist;
} catch (err) {
  console.log(Object.getOwnPropertyNames(err));
}
  // v8 4.5.103.45 (Node.js 4.8.0 x64)

[ 'stack', 'message' ]

  // v8 5.1.281.93 (Node.js 6.10.0 x64)

[ 'stack', 'message' ]

  // v8 5.5.372.40 (Node.js 7.6.0 x64)

[ 'stack', 'message' ]

  // v8 5.6.326.55 (Node.js 8.0.0-nightly20170222a1802e670d x64)

[ 'stack', 'message' ]

  // v8 5.8.202 (Node.js 8.0.0-pre x64)

[ 'stack', 'message' ]

Is this an unintended loss or is this property removed intentionally?

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    errorsIssues and PRs related to JavaScript errors originating in Node.js core.
    v8 engineIssues and PRs related to the V8 dependency.
    on Feb 25, 2017
  2. joyeecheung commented on Feb 26, 2017

    @joyeecheung
    Member

    I am guessing error.arguments is just a non-standard property and went away quitely in a V8 update?(the spec doesn't specify such a property).

  3. vsemozhetbyt commented on Feb 26, 2017

    @vsemozhetbyt
    ContributorAuthor

    Should I remove the statement and the code example?

  4. bnoordhuis commented on Feb 26, 2017

    @bnoordhuis
    Member

    @vsemozhetbyt Good idea.

  5. added a commit that references this issue on Mar 5, 2017
  6. added a commit that references this issue on Jul 19, 2017
  7. added a commit that references this issue on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.errorsIssues and PRs related to JavaScript errors originating in Node.js core.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions