@@ -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}
@@ -1028,10 +1028,12 @@ foo().then(() => console.log('done'));
1028
1028
added:
1029
1029
- v13.4.0
1030
1030
- v12.16.0
1031
+ changes:
1032
+ - version: REPLACEME
1033
+ pr-url: https://github.com/nodejs/node/pull/41267
1034
+ description: No longer experimental.
1031
1035
-->
1032
1036
1033
- > Stability: 1 - captureRejections is experimental.
1034
-
1035
1037
Value: {boolean}
1036
1038
1037
1039
Change the default ` captureRejections ` option on all new ` EventEmitter ` objects.
@@ -1040,12 +1042,14 @@ Change the default `captureRejections` option on all new `EventEmitter` objects.
1040
1042
1041
1043
<!-- YAML
1042
1044
added:
1043
- - v13.4.0
1044
- - v12.16.0
1045
+ - v13.4.0
1046
+ - v12.16.0
1047
+ changes:
1048
+ - version: REPLACEME
1049
+ pr-url: https://github.com/nodejs/node/pull/41267
1050
+ description: No longer experimental.
1045
1051
-->
1046
1052
1047
- > Stability: 1 - captureRejections is experimental.
1048
-
1049
1053
Value: ` Symbol.for('nodejs.rejection') `
1050
1054
1051
1055
See how to write a custom [ rejection handler] [ rejection ] .
0 commit comments