Closed
Description
Affected URL(s)
https://nodejs.org/api/util.html#utilgetsystemerrormessageerr
Description of the problem
The sample code for util.getSystemErrorMessage is shown below.
fs.access('file/that/does/not/exist', (err) => {
const name = util.getSystemErrorMessage(err.errno);
console.error(name); // No such file or directory
});
The usage and result of this example is correct. But the name
actually points to the message
. The temporary variable in this example has the same name as util.getSystemErrorName
. Therefore, changing name
to message
would clarify the documentation.
If this suggestion is OK, I will create a PullRequest.