From c183605cb0974be72c7392511c8814e27af5e53f Mon Sep 17 00:00:00 2001 From: ikuma-t Date: Tue, 4 Mar 2025 21:46:38 +0900 Subject: [PATCH] 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 --- doc/api/util.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/util.md b/doc/api/util.md index 15f1cc1516f6f9..7f15d418be2ed5 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -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 }); ```