@@ -173,8 +173,6 @@ myEmitter.emit('error', new Error('whoops!'));
173
173
174
174
## Capture rejections of promises
175
175
176
- > Stability: 1 - captureRejections is experimental.
177
-
178
176
Using ` async ` functions with event handlers is problematic, because it
179
177
can lead to an unhandled rejection in case of a thrown exception:
180
178
@@ -741,10 +739,12 @@ emitter.emit('log');
741
739
added:
742
740
- v13.4.0
743
741
- v12.16.0
742
+ changes:
743
+ - version: REPLACEME
744
+ pr-url: https://github.com/nodejs/node/pull/41267
745
+ description: No longer experimental.
744
746
-->
745
747
746
- > Stability: 1 - captureRejections is experimental.
747
-
748
748
* ` err ` Error
749
749
* ` eventName ` {string|symbol}
750
750
* ` ...args ` {any}
@@ -1027,10 +1027,12 @@ foo().then(() => console.log('done'));
1027
1027
added:
1028
1028
- v13.4.0
1029
1029
- v12.16.0
1030
+ changes:
1031
+ - version: REPLACEME
1032
+ pr-url: https://github.com/nodejs/node/pull/41267
1033
+ description: No longer experimental.
1030
1034
-->
1031
1035
1032
- > Stability: 1 - captureRejections is experimental.
1033
-
1034
1036
Value: {boolean}
1035
1037
1036
1038
Change the default ` captureRejections ` option on all new ` EventEmitter ` objects.
@@ -1039,12 +1041,14 @@ Change the default `captureRejections` option on all new `EventEmitter` objects.
1039
1041
1040
1042
<!-- YAML
1041
1043
added:
1042
- - v13.4.0
1043
- - v12.16.0
1044
+ - v13.4.0
1045
+ - v12.16.0
1046
+ changes:
1047
+ - version: REPLACEME
1048
+ pr-url: https://github.com/nodejs/node/pull/41267
1049
+ description: No longer experimental.
1044
1050
-->
1045
1051
1046
- > Stability: 1 - captureRejections is experimental.
1047
-
1048
1052
Value: ` Symbol.for('nodejs.rejection') `
1049
1053
1050
1054
See how to write a custom [ rejection handler] [ rejection ] .
0 commit comments