node/lib/internal/bootstrap
Joyee Cheung a33c3c6d33
src: refactor uncaught exception handling
The C++ land `node::FatalException()` is not in fact fatal anymore.
It gives the user a chance to handle the uncaught exception
globally by listening to the `uncaughtException` event. This patch
renames it to `TriggerUncaughtException` in C++ to avoid the confusion.

In addition rename the JS land handler to `onGlobalUncaughtException`
to reflect its purpose - we have to keep the alias
`process._fatalException` and use that for now since it has been
monkey-patchable in the user land.

This patch also

- Adds more comments to the global uncaught exception handling routine
- Puts a few other C++ error handling functions into the `errors`
  namespace
- Moves error-handling-related bindings to the `errors` binding.

Refs: 2b252acea4

PR-URL: https://github.com/nodejs/node/pull/28257
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-06-19 16:16:37 +08:00
..
environment.js process: run RunBootstrapping in CreateEnvironment 2019-04-03 08:46:03 +08:00
loaders.js module: initialize module_wrap.callbackMap during pre-execution 2019-04-25 12:11:10 +08:00
node.js src: refactor uncaught exception handling 2019-06-19 16:16:37 +08:00
pre_execution.js src: only run preloadModules if the preload array is not empty 2019-06-09 14:33:28 +05:30