New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(node/url): Use Class defined in node/_error.ts
to throw exception
#1342
Conversation
@wafuwafu13 Thank you for your contribution. Can add test cases for this fix? |
node/_error.ts
to throw exception
// }); | ||
// } | ||
// } | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add test cases for this fix?
98cc5ae is related here.
} | ||
return pathname.slice(1); | ||
} | ||
} | ||
|
||
function getPathFromURLPosix(url: URL): string { | ||
if (url.hostname !== "") { | ||
throw new Deno.errors.InvalidData("invalid file url hostname"); | ||
throw new ERR_INVALID_FILE_URL_HOST(osType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wafuwafu13 Very nice! LGTM
Part of #911