Skip to content
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

Clarify behaviour of napi_throw() #309

Closed
gabrielschulhof opened this issue Apr 28, 2018 · 0 comments
Closed

Clarify behaviour of napi_throw() #309

gabrielschulhof opened this issue Apr 28, 2018 · 0 comments
Assignees

Comments

@gabrielschulhof
Copy link
Collaborator

The document says that napi_throw() throws an Error provided. Is it
necessary for it to be an Error, or can you throw any value? You should be
allowed to throw any value, I should think.

Re: nodejs/node#14256

@gabrielschulhof gabrielschulhof self-assigned this Apr 30, 2018
gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this issue Apr 30, 2018
Ensure that napi_throw() is able to throw a primitive value, and
document that it is able to throw any JavaScript value.

Fixes: nodejs/abi-stable-node#309
gabrielschulhof pushed a commit to nodejs/node that referenced this issue May 2, 2018
Ensure that napi_throw() is able to throw a primitive value, and
document that it is able to throw any JavaScript value.

Fixes: nodejs/abi-stable-node#309
PR-URL: #20428
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit to nodejs/node that referenced this issue May 4, 2018
Ensure that napi_throw() is able to throw a primitive value, and
document that it is able to throw any JavaScript value.

Fixes: nodejs/abi-stable-node#309
PR-URL: #20428
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant