Skip to content

Commit c6df7d2

Browse files
Use console.error() for errors consistently (#7411)
In all examples in this document errors are logged by using `console.error()` method And it's unclear why in promise-based part we have different strategy Signed-off-by: Artem Dragunov <[email protected]>
1 parent 02f5a3e commit c6df7d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/site/pages/en/learn/manipulating-files/reading-files-with-nodejs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async function example() {
6666
const data = await fs.readFile('/Users/joe/test.txt', { encoding: 'utf8' });
6767
console.log(data);
6868
} catch (err) {
69-
console.log(err);
69+
console.error(err);
7070
}
7171
}
7272
example();
@@ -79,7 +79,7 @@ try {
7979
const data = await fs.readFile('/Users/joe/test.txt', { encoding: 'utf8' });
8080
console.log(data);
8181
} catch (err) {
82-
console.log(err);
82+
console.error(err);
8383
}
8484
```
8585

0 commit comments

Comments
 (0)