mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
lib: change concatenated string to template
PR-URL: https://github.com/nodejs/node/pull/16930 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
This commit is contained in:
committed by
Franziska Hinkelmann
parent
34006d6ee6
commit
23afa30672
@@ -51,7 +51,7 @@ function errnoException(err, syscall, hostname) {
|
||||
}
|
||||
var ex = null;
|
||||
if (typeof err === 'string') { // c-ares error code.
|
||||
const errHost = hostname ? ' ' + hostname : '';
|
||||
const errHost = hostname ? ` ${hostname}` : '';
|
||||
ex = new Error(`${syscall} ${err}${errHost}`);
|
||||
ex.code = err;
|
||||
ex.errno = err;
|
||||
|
||||
Reference in New Issue
Block a user