events: show throw stack trace for uncaught exception
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), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
events