0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal/util
Joyee Cheung 94454927f6
process: split routines used to enhance fatal exception stack traces
Previously the enhancement were done right after emitting
`'uncaughtException'`, which meant by the time we knew the
exception was fatal in C++, the error.stack had already been
patched.

This patch moves those routines to be called later during the
fatal exception handling, and split them into two stages:
before and after the inspector is notified by the invocation of
`V8Inspector::exceptionThrown`. We now expand the stack to include
additional informations about unhandled 'error' events before
the inspector is notified, but delay the highlighting of the
frames until after the inspector is notified, so that the
ANSI escape sequences won't show up in the inspector console.

PR-URL: https://github.com/nodejs/node/pull/28308
Fixes: https://github.com/nodejs/node/issues/28287
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-06-27 20:22:08 +08:00
..
comparisons.js assert: loose deep equal should not compare symbol properties 2019-05-13 16:17:00 -07:00
debuglog.js util: access process states lazily in debuglog 2019-04-20 00:30:38 +08:00
inspect.js process: split routines used to enhance fatal exception stack traces 2019-06-27 20:22:08 +08:00
inspector.js lib: rework logic of stripping BOM+Shebang from commonjs 2019-05-26 13:04:29 -05:00
types.js