Skip to content

Commit d49cd3d

Browse files
IkumaTadokoroRafaelGSS
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 f8d2adc commit d49cd3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/util.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,8 @@ The mapping between error codes and string messages is platform-dependent.
668668

669669
```js
670670
fs.access('file/that/does/not/exist', (err) => {
671-
const name = util.getSystemErrorMessage(err.errno);
672-
console.error(name); // No such file or directory
671+
const message = util.getSystemErrorMessage(err.errno);
672+
console.error(message); // No such file or directory
673673
});
674674
```
675675

0 commit comments

Comments
 (0)