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 fa5b65e

Browse filesBrowse files
deokjinkimjuanarbol
authored andcommitted
doc: use console.error for error case in timers and tls
console.error is more suitable than console.log for error case. PR-URL: #46002 Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent aec340b commit fa5b65e
Copy full SHA for fa5b65e

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

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

‎doc/api/timers.md‎

Copy file name to clipboardExpand all lines: doc/api/timers.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ setImmediatePromise('foobar', { signal })
278278
.then(console.log)
279279
.catch((err) => {
280280
if (err.name === 'AbortError')
281-
console.log('The immediate was aborted');
281+
console.error('The immediate was aborted');
282282
});
283283

284284
ac.abort();
@@ -296,7 +296,7 @@ setTimeoutPromise(1000, 'foobar', { signal })
296296
.then(console.log)
297297
.catch((err) => {
298298
if (err.name === 'AbortError')
299-
console.log('The timeout was aborted');
299+
console.error('The timeout was aborted');
300300
});
301301

302302
ac.abort();
Collapse file

‎doc/api/tls.md‎

Copy file name to clipboardExpand all lines: doc/api/tls.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let tls;
2929
try {
3030
tls = require('node:tls');
3131
} catch (err) {
32-
console.log('tls support is disabled!');
32+
console.error('tls support is disabled!');
3333
}
3434
```
3535

@@ -47,7 +47,7 @@ let tls;
4747
try {
4848
tls = await import('node:tls');
4949
} catch (err) {
50-
console.log('tls support is disabled!');
50+
console.error('tls support is disabled!');
5151
}
5252
```
5353

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.