Skip to content

Commit e6f113d

Browse files
vsemozhetbytitaloacasas
authored andcommitted
doc: console.log() -> console.error() in events.md
PR-URL: #11810 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent cde5d71 commit e6f113d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/events.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ can be used. (_Note, however, that the `domain` module has been deprecated_)
148148
const myEmitter = new MyEmitter();
149149

150150
process.on('uncaughtException', (err) => {
151-
console.log('whoops! there was an error');
151+
console.error('whoops! there was an error');
152152
});
153153

154154
myEmitter.emit('error', new Error('whoops!'));
@@ -160,7 +160,7 @@ As a best practice, listeners should always be added for the `'error'` events.
160160
```js
161161
const myEmitter = new MyEmitter();
162162
myEmitter.on('error', (err) => {
163-
console.log('whoops! there was an error');
163+
console.error('whoops! there was an error');
164164
});
165165
myEmitter.emit('error', new Error('whoops!'));
166166
// Prints: whoops! there was an error

0 commit comments

Comments
 (0)