-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.
Description
Affected URL(s)
https://nodejs.org/api/n-api.html#usage
Description of the problem
Shouldn't return NULL be moved outside of the if block in the NAPI_CALL macro? Like this:
if (!is_pending) { \
... \
napi_throw_error((env), NULL, message); \
/* return NULL; */ \
} \
return NULL; \
Otherwise the user's function will continue and may result in more napi calls.
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.node-apiIssues and PRs related to the Node-API.Issues and PRs related to the Node-API.