mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: use console.error for error case in fs, https, net and process
console.error is more suitable than console.log for error case. PR-URL: https://github.com/nodejs/node/pull/45606 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
This commit is contained in:
@@ -24,7 +24,7 @@ let https;
|
||||
try {
|
||||
https = require('node:https');
|
||||
} catch (err) {
|
||||
console.log('https support is disabled!');
|
||||
console.error('https support is disabled!');
|
||||
}
|
||||
```
|
||||
|
||||
@@ -42,7 +42,7 @@ let https;
|
||||
try {
|
||||
https = await import('node:https');
|
||||
} catch (err) {
|
||||
console.log('https support is disabled!');
|
||||
console.error('https support is disabled!');
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user