-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
node_api: add napi_fatal_exception #19337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
7fefdda
e602e9c
a575495
de3c603
aa5498b
5ff7ba4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,6 +112,8 @@ NAPI_EXTERN napi_status | |
| napi_get_last_error_info(napi_env env, | ||
| const napi_extended_error_info** result); | ||
|
|
||
| NAPI_EXTERN void napi_fatal_exception(napi_env env); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I would prefer it if you could pass in the exception here, like the existing Node APIs do – you should be able to get a currently pending exception with Actually passing the exception along to Node’s fatal exception handling seems orthogonal to that?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. orthogonal? i'm ok with added a napi_value that is used as the exception yes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mh, sorry – orthogonal ~= independent … basically, I’d suggest that we provide users with the smallest pieces that make sense to be exposed in the API, rather than exposing a function that actually does two operations masquerading as one (getting the last exception + passing it to the fatal exception handler) |
||
|
|
||
| NAPI_EXTERN NAPI_NO_RETURN void napi_fatal_error(const char* location, | ||
| size_t location_len, | ||
| const char* message, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REPLACEMEis the magic word that gets picked up by the release tooling, please change to that :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! i was offline and trying hard to remember what it was