mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 19:36:29 +00:00

For unhandled `'error'` events, include the constructor name for subclasses of EventEmitter, if possible. This makes tracing errors easier when both creation of the `Error` object and emitting it happen in code that does not refer back to the event emitter. PR-URL: https://github.com/nodejs/node/pull/28952 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
18 lines
770 B
Plaintext
18 lines
770 B
Plaintext
events.js:*
|
|
throw er; // Unhandled 'error' event
|
|
^
|
|
|
|
Error
|
|
at Object.<anonymous> (*events_unhandled_error_subclass.js:*:*)
|
|
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
|
at Object.Module._extensions..js (internal/modules/cjs/loader.js:*:*)
|
|
at Module.load (internal/modules/cjs/loader.js:*:*)
|
|
at Function.Module._load (internal/modules/cjs/loader.js:*:*)
|
|
at Function.Module.runMain (internal/modules/cjs/loader.js:*:*)
|
|
at internal/main/run_main_module.js:*:*
|
|
Emitted 'error' event on Foo instance at:
|
|
at Object.<anonymous> (*events_unhandled_error_subclass.js:*:*)
|
|
at Module._compile (internal/modules/cjs/loader.js:*:*)
|
|
[... lines matching original stack trace ...]
|
|
at internal/main/run_main_module.js:*:*
|