-
Notifications
You must be signed in to change notification settings - Fork 94
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
[guide] Rejections Should Be Errors should cater for DOMException #84
Comments
updated issue title. |
@marcoscaceres Where is this advice? |
Actually DOMException is instanceof Error; it's DOMError that's the problem. But yes, we should specifically tell people not to use DOMError, and instead to use DOMException. |
@erights it's not quite explicit in the spec, but basically: http://dom.spec.whatwg.org/#errors @domenic see: http://dom.spec.whatwg.org/#domexception ... it does not extend Error. |
Oh poop. Well, in that case, neither DOMError nor DOMException is currently suitable for use with promises. |
The test:
Chrome: true |
DOMException has problems, this is not one of them. DOMError is planned for removal. |
Yeah, turned out that WebIDL defines what the prototype is. It's still very messy the way it's defined and Anne filed a bug for this long ago. Sorry for the wild goose chase. |
The advice given in the error section is a bit problematic, as DOM recommends using
DOMException
s, which are not instances of ES Error :( I agree that we should Error instead, but there is a lot precedence for usingDOMException
on the platform.The text was updated successfully, but these errors were encountered: