| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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: nodejs@2b252ac
|
Sadly, an error occurred when I tried to trigger a build. :( |
Sorry, something went wrong.
| triggerFatalException(error, false /* fromPromise */); | ||
| // runInAsyncScope() swallows the error so we need to catch | ||
| // it and handle it here. | ||
| triggerUncaughtException(error, false /* fromPromise */); |
There was a problem hiding this comment.
@devsnek I tried a cctest on V8 master and it seems the issue still exist. However we still need to catch the error even when it's fixed since runInAsyncScope() will swallow the error.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
cc @nodejs/process |
Sorry, something went wrong.
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: 2b252ac PR-URL: #28257 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
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: 2b252ac PR-URL: #28257 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
| Back | FazBrowse Home | New Git URL |
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
namespace
Refs: 2b252ac
Checklist