You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suggested improvements to the name of the temporary variable in the example of util.getSystemErrorMessage #57305
The sample code for util.getSystemErrorMessage is shown below.
fs.access('file/that/does/not/exist',(err)=>{constname=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.
changed the title [-]Suggested improvements to the name of temporary variable in the sample[/-][+]Suggested improvements to the name of the temporary variable in the example of util.getSystemErrorMessage[/+]on Mar 4, 2025
Activity
[-]Suggested improvements to the name of temporary variable in the sample[/-][+]Suggested improvements to the name of the temporary variable in the example of util.getSystemErrorMessage[/+]joyeecheung commentedon Mar 4, 2025
SGTM, PR welcomed :)
doc: use more clear name in getSystemErrorMessage's example
doc: use more clear name in getSystemErrorMessage's example
doc: use more clear name in getSystemErrorMessage's example
doc: use more clear name in getSystemErrorMessage's example
doc: use more clear name in getSystemErrorMessage's example
doc: use more clear name in getSystemErrorMessage's example
doc: use more clear name in getSystemErrorMessage's example
doc: use more clear name in getSystemErrorMessage's example