Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 331c0a8

Browse filesBrowse files
vsemozhetbytMylesBorins
authored andcommitted
doc: console.log() -> console.error() in events.md
PR-URL: #11810 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent f8426d9 commit 331c0a8
Copy full SHA for 331c0a8

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/events.md‎

Copy file name to clipboardExpand all lines: doc/api/events.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.