Skip to content

Commit

Permalink
squash: use EventEmitter.captureRejections = true
Browse files Browse the repository at this point in the history
  • Loading branch information
F3n67u committed Jun 14, 2022
1 parent 0fd79f3 commit dd59c03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/events.md
Expand Up @@ -232,10 +232,10 @@ Setting `events.captureRejections = true` will change the default for all
new instances of `EventEmitter`.

```mjs
import * as events from 'node:events';
import { EventEmitter } from 'node:events'

events.captureRejections = true;
const ee1 = new events.EventEmitter();
EventEmitter.captureRejections = true;
const ee1 = new EventEmitter();
ee1.on('something', async (value) => {
throw new Error('kaboom');
});
Expand Down

0 comments on commit dd59c03

Please sign in to comment.