From 495cf118a08f64aebf56028cb3f5331131124e21 Mon Sep 17 00:00:00 2001 From: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:59:23 +0200 Subject: [PATCH] fixup! switch url and parentURL to props --- lib/internal/errors.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index e593c1985046eb..72ea8a58b94c14 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -1308,11 +1308,10 @@ E('ERR_INVALID_CURSOR_POS', E('ERR_INVALID_FD', '"fd" must be a positive integer: %s', RangeError); E('ERR_INVALID_FD_TYPE', 'Unsupported fd type: %s', TypeError); -E('ERR_INVALID_FILE_URL_HOST', (url, platform, base) => { - let msg = `File URL host in ${url}`; - if (base) { msg += ` from ${base}`; } - msg += ` must be "localhost" or empty on ${platform}`; - return msg; +E('ERR_INVALID_FILE_URL_HOST', function(url, platform, base) { + this.input = url.href; + this.module = base; + return `File URL host must be "localhost" or empty on ${platform}`; }, TypeError); E('ERR_INVALID_FILE_URL_PATH', 'File URL path %s', TypeError); E('ERR_INVALID_HANDLE_TYPE', 'This handle type cannot be sent', TypeError);