Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorChengzhong Wu <chengzhong.wcz@alibaba-inc.com>2022-09-13 11:29:10 +0300
committerlegendecas <legendecas@gmail.com>2022-09-20 19:02:14 +0300
commit9b369824cb58d1dfbec2db84380014df07280755 (patch)
tree371f3d12faba8e9ac9c964f55a21574895f3a740 /doc/api
parent96f072231d88ed3ed4a5422f2e37485b59f39e4d (diff)
node-api: add deprecation code of uncaught exception
Deprecation should reference a valid deprecation code. PR-URL: https://github.com/nodejs/node/pull/44624 Refs: https://github.com/nodejs/node/pull/36510 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/deprecations.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index 1d29a76306e..cd4d94d7cdd 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -3238,12 +3238,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
+changes:
+ - version:
+ - v18.3.0
+ - v16.17.0
+ pr-url: https://github.com/nodejs/node/pull/36510
+ description: Runtime deprecation.
+-->
+
+Type: Runtime.
+
+The implicit suppression of uncaught exceptions in Node-API callbacks is now
+deprecated.
+
+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]: url.md#legacy-url-api
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4
[WHATWG URL API]: url.md#the-whatwg-url-api
[`"exports"` or `"main"` entry]: packages.md#main-entry-point-export
+[`'uncaughtException'`]: process.md#event-uncaughtexception
+[`--force-node-api-uncaught-exceptions-policy`]: cli.md#--force-node-api-uncaught-exceptions-policy
[`--pending-deprecation`]: cli.md#--pending-deprecation
[`--throw-deprecation`]: cli.md#--throw-deprecation
[`--trace-atomics-wait`]: cli.md#--trace-atomics-wait