Skip to content

Commit 4e438c3

Browse files
IkumaTadokoroaduh95
authored andcommitted
doc: use more clear name in getSystemErrorMessage's example
In the previous example, `name` actually points to the `message`. So I changed this name to fit the context of the example. Fixes: #57305 PR-URL: #57310 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
1 parent 6f1c622 commit 4e438c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/util.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,8 @@ The mapping between error codes and string messages is platform-dependent.
660660

661661
```js
662662
fs.access('file/that/does/not/exist', (err) => {
663-
const name = util.getSystemErrorMessage(err.errno);
664-
console.error(name); // No such file or directory
663+
const message = util.getSystemErrorMessage(err.errno);
664+
console.error(message); // No such file or directory
665665
});
666666
```
667667

0 commit comments

Comments
 (0)