Skip to content

util: add AggregateError.prototype.errors to inspect output#43646

Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom
LiviaMedeiros:inspect-agriculture-error
Jul 9, 2022
Merged

util: add AggregateError.prototype.errors to inspect output#43646
nodejs-github-bot merged 2 commits intonodejs:mainfrom
LiviaMedeiros:inspect-agriculture-error

Conversation

@LiviaMedeiros
Copy link
Member

@LiviaMedeiros LiviaMedeiros commented Jul 1, 2022

Fixes: #43645

Old:

> (()=>{throw new AggregateError([new TypeError('blep'), new RangeError('blop')],'gwak')})()
Uncaught AggregateError: gwak
    at REPL1:1:13

New:

> (()=>{throw new AggregateError([new TypeError('blep'), new RangeError('blop')],'gwak')})()
Uncaught AggregateError: gwak
    at REPL1:1:13 {
  [errors]: [
    TypeError: blep
        at REPL1:1:33
        at REPL1:1:89
        at Script.runInThisContext (node:vm:130:12)
        at REPLServer.defaultEval (node:repl:572:29)
        at bound (node:domain:426:15)
        at REPLServer.runBound [as eval] (node:domain:437:12)
        at REPLServer.onLine (node:repl:902:10)
        at REPLServer.emit (node:events:549:35)
        at REPLServer.emit (node:domain:482:12)
        at [_onLine] [as _onLine] (node:internal/readline/interface:425:12),
    RangeError: blop
        at REPL1:1:56
        at REPL1:1:89
        at Script.runInThisContext (node:vm:130:12)
        at REPLServer.defaultEval (node:repl:572:29)
        at bound (node:domain:426:15)
        at REPLServer.runBound [as eval] (node:domain:437:12)
        at REPLServer.onLine (node:repl:902:10)
        at REPLServer.emit (node:events:549:35)
        at REPLServer.emit (node:domain:482:12)
        at [_onLine] [as _onLine] (node:internal/readline/interface:425:12)
  ]
}

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. errors Issues and PRs related to JavaScript errors originated in Node.js core. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inspect: print individual AggregateError.errors

5 participants