From 8032e96cc82934bf020aaaaec81a30edefc3bea6 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 PR-URL: https://github.com/nodejs/node/pull/57310 Reviewed-By: Joyee Cheung Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Edy Silva --- 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 15f1cc1516f..7f15d418be2 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 }); ```