Skip to content
Browse files
node-api: add deprecation code of uncaught exception
Deprecation should reference a valid deprecation code.

PR-URL: #44624
Refs: #36510
Reviewed-By: Tobias Nießen <>
Reviewed-By: Michael Dawson <>
  • Loading branch information
legendecas authored and RafaelGSS committed Sep 26, 2022
1 parent 9b3b7d6 commit 64cb43a2b6370705536a2d530152cf85f00ad923
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
@@ -3217,12 +3217,34 @@ details.
These groups might be removed in future versions of Node.js. Applications that
rely on these groups should evaluate using stronger MODP groups instead.

### DEP0168: Unhandled exception in Node-API callbacks

<!-- YAML
- version:
- v18.3.0
- v16.17.0
description: Runtime deprecation.

Type: Runtime.

The implicit suppression of uncaught exceptions in Node-API callbacks is now

Set the flag [`--force-node-api-uncaught-exceptions-policy`][] to force Node.js
to emit an [`'uncaughtException'`][] event if the exception is not handled in
Node-API callbacks.

[Legacy URL API]:
[NIST SP 800-38D]:
[RFC 6066]:
[RFC 8247 Section 2.4]:
[`"exports"` or `"main"` entry]:
@@ -90,7 +90,7 @@ void node_napi_env__::CallbackIntoModule(T&& call) {
"Uncaught N-API callback exception detected, please run node "
"with option --force-node-api-uncaught-exceptions-policy=true"
"to handle those exceptions properly.",
// If there was an unhandled exception in the complete callback,

0 comments on commit 64cb43a

Please sign in to comment.