Skip to content

Commit

Permalink
doc: console.log() -> console.error() in events.md
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
vsemozhetbyt authored and italoacasas committed Mar 20, 2017
1 parent cde5d71 commit e6f113d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ can be used. (_Note, however, that the `domain` module has been deprecated_)
const myEmitter = new MyEmitter();

process.on('uncaughtException', (err) => {
console.log('whoops! there was an error');
console.error('whoops! there was an error');
});

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

0 comments on commit e6f113d

Please sign in to comment.