mirror of https://github.com/nodejs/node.git
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: https://github.com/nodejs/node/issues/57305 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
117c1ca9eb
commit
8032e96cc8
|
@ -668,8 +668,8 @@ The mapping between error codes and string messages is platform-dependent.
|
|||
|
||||
```js
|
||||
fs.access('file/that/does/not/exist', (err) => {
|
||||
const name = util.getSystemErrorMessage(err.errno);
|
||||
console.error(name); // No such file or directory
|
||||
const message = util.getSystemErrorMessage(err.errno);
|
||||
console.error(message); // No such file or directory
|
||||
});
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue