-
Notifications
You must be signed in to change notification settings - Fork 30k
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
N-API: add error code to error creation methods #13933
Labels
node-api
Issues and PRs related to the Node-API.
Comments
I'm going start on this later today. |
This was referenced Jun 26, 2017
4 tasks
mhdawson
added a commit
to mhdawson/io.js
that referenced
this issue
Jul 13, 2017
In support of the effort to add error codes to all errors generated by Node.js, add an optional code parameter to the helper functions used to throw/create errors in N-API. Fixes: nodejs#13933
addaleax
pushed a commit
to addaleax/node
that referenced
this issue
Jul 24, 2017
In support of the effort to add error codes to all errors generated by Node.js, add an optional code parameter to the helper functions used to throw/create errors in N-API. PR-URL: nodejs#13988 Fixes: nodejs#13933 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
addaleax
pushed a commit
to addaleax/node
that referenced
this issue
Jul 27, 2017
In support of the effort to add error codes to all errors generated by Node.js, add an optional code parameter to the helper functions used to throw/create errors in N-API. Backport-PR-URL: nodejs#14453 Backport-Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: nodejs#13988 Fixes: nodejs#13933 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
gabrielschulhof
pushed a commit
to gabrielschulhof/node
that referenced
this issue
Apr 10, 2018
In support of the effort to add error codes to all errors generated by Node.js, add an optional code parameter to the helper functions used to throw/create errors in N-API. PR-URL: nodejs#13988 Fixes: nodejs#13933 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins
pushed a commit
that referenced
this issue
Apr 16, 2018
In support of the effort to add error codes to all errors generated by Node.js, add an optional code parameter to the helper functions used to throw/create errors in N-API. Backport-PR-URL: #19447 PR-URL: #13988 Fixes: #13933 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As part of the push on #11273 we should encourage the good practice of providing a code separate from the message on errors created by N-API modules. Since the modules don't have access to the internal list of errors they will not necessarily use the same error codes/templates, but it will still encourage good practice and could be useful if N-API is later used to implement internal modules.
This would likely be by adding an optional code value to existing APIs like napi_create_error.
The text was updated successfully, but these errors were encountered: