summaryrefslogtreecommitdiff
path: root/ext/url/00_url.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/url/00_url.js')
-rw-r--r--ext/url/00_url.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/url/00_url.js b/ext/url/00_url.js
index 5479cb59c..ebb7b6277 100644
--- a/ext/url/00_url.js
+++ b/ext/url/00_url.js
@@ -64,16 +64,19 @@
componentsBuf.buffer,
);
}
- return getSerialization(status, href);
+ return getSerialization(status, href, maybeBase);
}
- function getSerialization(status, href) {
+ function getSerialization(status, href, maybeBase) {
if (status === 0) {
return href;
} else if (status === 1) {
return core.ops.op_url_get_serialization();
} else {
- throw new TypeError("Invalid URL");
+ throw new TypeError(
+ `Invalid URL: '${href}'` +
+ (maybeBase ? ` with base '${maybeBase}'` : ""),
+ );
}
}