GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — events: graduate capturerejections to supported · nodejs/node@4079fc4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • events.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/events.md‎

Copy file name to clipboardExpand all lines: doc/api/events.md
+14-10Lines changed: 14 additions & 10 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ myEmitter.emit('error', new Error('whoops!'));
173173

174174
## Capture rejections of promises
175175

176-
> Stability: 1 - captureRejections is experimental.
177-
178176
Using `async` functions with event handlers is problematic, because it
179177
can lead to an unhandled rejection in case of a thrown exception:
180178

@@ -741,10 +739,12 @@ emitter.emit('log');
741739
added:
742740
- v13.4.0
743741
- v12.16.0
742+
changes:
743+
- version: REPLACEME
744+
pr-url: https://github.com/nodejs/node/pull/41267
745+
description: No longer experimental.
744746
-->
745747

746-
> Stability: 1 - captureRejections is experimental.
747-
748748
* `err` Error
749749
* `eventName` {string|symbol}
750750
* `...args` {any}
@@ -1028,10 +1028,12 @@ foo().then(() => console.log('done'));
10281028
added:
10291029
- v13.4.0
10301030
- v12.16.0
1031+
changes:
1032+
- version: REPLACEME
1033+
pr-url: https://github.com/nodejs/node/pull/41267
1034+
description: No longer experimental.
10311035
-->
10321036

1033-
> Stability: 1 - captureRejections is experimental.
1034-
10351037
Value: {boolean}
10361038

10371039
Change the default `captureRejections` option on all new `EventEmitter` objects.
@@ -1040,12 +1042,14 @@ Change the default `captureRejections` option on all new `EventEmitter` objects.
10401042

10411043
<!-- YAML
10421044
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.
10451051
-->
10461052

1047-
> Stability: 1 - captureRejections is experimental.
1048-
10491053
Value: `Symbol.for('nodejs.rejection')`
10501054

10511055
See how to write a custom [rejection handler][rejection].

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.