Skip to content

events: show throw stack trace for uncaught exception

Rodrigo Muino Tomonari requested to merge github/fork/addaleax/events-stack into master

Show the stack trace for the eventemitter.emit('error') call in the case of an uncaught exception.

Previously, there would be no clue in Node’s output about where the actual throw comes from.


In its current form, this patch would not modify err.stack if the exception is handled somewhere, and it redacts lines from the throw stack trace if they are duplicates of the original error stack trace (which likely occurs a lot).

Those design choices are up for debate :)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

events

Merge request reports

Loading