mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
n-api: add code parameter to error helpers
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: https://github.com/nodejs/node/pull/13988 Fixes: https://github.com/nodejs/node/issues/13933 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
598a128ff4
commit
ac41db4af0
9 files changed
+303
-32
No files matched your search
@@ -161,6 +161,8 @@ E('ERR_IPC_ONE_PIPE', 'Child process can have only one IPC pipe');
|
||||
E('ERR_IPC_SYNC_FORK', 'IPC cannot be used with synchronous forks');
|
||||
E('ERR_MISSING_ARGS', missingArgs);
|
||||
E('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
|
||||
E('ERR_NAPI_CONS_FUNCTION', 'Constructor must be a function');
|
||||
E('ERR_NAPI_CONS_PROTOTYPE_OBJECT', 'Constructor.prototype must be an object');
|
||||
E('ERR_NO_CRYPTO', 'Node.js is not compiled with OpenSSL crypto support');
|
||||
E('ERR_PARSE_HISTORY_DATA', 'Could not parse history data in %s');
|
||||
E('ERR_SOCKET_ALREADY_BOUND', 'Socket is already bound');
|
||||
|
||||
Reference in new issue
Block a user