Unverified Commit eeea0dd1 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

events: show inspected error in uncaught 'error' message

If there is no handler for `.emit('error', value)` and `value`
is not an `Error` object, we currently just call `.toString()`
on it.

Almost always, using `util.inspect()` provides better information
for diagnostic purposes, so prefer to use that instead.

Refs: https://github.com/nodejs/help/issues/1729

PR-URL: https://github.com/nodejs/node/pull/25621


Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarMatheus Marchini <mat@mmarchini.me>
parent 2b653996
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment