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:
ikuma-t 2025-03-04 21:46:38 +09:00 committed by jakecastelli
parent 117c1ca9eb
commit 8032e96cc8
1 changed files with 2 additions and 2 deletions

View File

@ -668,8 +668,8 @@ The mapping between error codes and string messages is platform-dependent.
```js ```js
fs.access('file/that/does/not/exist', (err) => { fs.access('file/that/does/not/exist', (err) => {
const name = util.getSystemErrorMessage(err.errno); const message = util.getSystemErrorMessage(err.errno);
console.error(name); // No such file or directory console.error(message); // No such file or directory
}); });
``` ```