util: improve error inspection
When inspecting errors with extra properties while setting the
compact option to false, it will now return:
[Error: foo] {
at repl:1:5
at Script.runInThisContext (vm.js:89:20)
bla: true
}
Instead of:
Error: foo
at repl:1:5
at Script.runInThisContext (vm.js:91:20) {
bla: true
}
PR-URL: https://github.com/nodejs/node/pull/20802
Refs: https://github.com/nodejs/node/issues/20253
Reviewed-By:
Anna Henningsen <anna@addaleax.net>
Reviewed-By:
James M Snell <jasnell@gmail.com>
Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
parent
e8522898
Please register or sign in to comment