lib: adjust params from uvExceptionWithHostPort
PR-URL: https://github.com/nodejs/node/pull/24159 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
a1f10d1fd3
commit
4aec4216a0
@ -294,10 +294,9 @@ function uvException(ctx) {
|
||||
* @param {string} syscall
|
||||
* @param {string} address
|
||||
* @param {number} [port]
|
||||
* @param {string} [additional]
|
||||
* @returns {Error}
|
||||
*/
|
||||
function uvExceptionWithHostPort(err, syscall, address, port, additional) {
|
||||
function uvExceptionWithHostPort(err, syscall, address, port) {
|
||||
const [ code, uvmsg ] = errmap.get(err);
|
||||
const message = `${syscall} ${code}: ${uvmsg}`;
|
||||
let details = '';
|
||||
@ -307,9 +306,6 @@ function uvExceptionWithHostPort(err, syscall, address, port, additional) {
|
||||
} else if (address) {
|
||||
details = ` ${address}`;
|
||||
}
|
||||
if (additional) {
|
||||
details += ` - Local (${additional})`;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
const ex = new Error(`${message}${details}`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user