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 authored and Antoine du Hamel committed 2025-03-09 11:38:43 +01:00
1 parent 6f1c622466
commit 4e438c3fa3
1 file changed
+2 -2
+2 -2
View File
@@ -660,8 +660,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
});
```