Skip to content
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

New error system in WHATWG URL implementation #11299

Closed
joyeecheung opened this issue Feb 10, 2017 · 2 comments
Closed

New error system in WHATWG URL implementation #11299

joyeecheung opened this issue Feb 10, 2017 · 2 comments
Labels
discuss Issues opened for discussions and feedbacks. errors Issues and PRs related to JavaScript errors originated in Node.js core. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Comments

@joyeecheung
Copy link
Member

joyeecheung commented Feb 10, 2017

Just realized according to the spec the errors thrown from our WHATWG URL implementation should be ECMAScript error objects, but internal/errors.js provides errors subclassing those error classes, so does that mean our WHATWG URL implementation cannot be migrated to this new error system, or do we have a way to work around that?

refs: #11220
refs: #11273

cc @nodejs/url

@joyeecheung joyeecheung added errors Issues and PRs related to JavaScript errors originated in Node.js core. whatwg-url Issues and PRs related to the WHATWG URL implementation. discuss Issues opened for discussions and feedbacks. labels Feb 10, 2017
@jasnell
Copy link
Member

jasnell commented Feb 10, 2017

Using the new error system should be fine. The only significant difference is the addition of the code property which would just need to be documented as a Node.js specific extension. instanceof Error / instanceof TypeError still work for these as expected.

@joyeecheung
Copy link
Member Author

I think this can be closed now.

TimothyGu added a commit that referenced this issue Apr 25, 2017
Also slightly revises grammar.

PR-URL: #12574
Refs: #11273
Refs: #11299
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Issues opened for discussions and feedbacks. errors Issues and PRs related to JavaScript errors originated in Node.js core. whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

No branches or pull requests

2 participants