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:
Pawan Jangid
2017-11-10 17:54:19 +05:30
committed by Franziska Hinkelmann
parent 34006d6ee6
commit 23afa30672

View File

@@ -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;