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

Add DOMException #3740

Closed
bartlomieju opened this issue Jan 21, 2020 · 1 comment
Closed

Add DOMException #3740

bartlomieju opened this issue Jan 21, 2020 · 1 comment

Comments

@bartlomieju
Copy link
Member

Reading from MDN:

The DOMException interface represents an abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. This is basically how error conditions are described in web APIs.

We should implement DOMException as part of Web compatibility and effort to reduce custom errors (#2635).

There are already TODOs in our code for that:

// TODO: throw `DOMException`
throw new DenoError(
ErrorKind.InvalidInput,
"The string to be decoded is not correctly encoded"
);
}

It will also come in handy in workers implementation

@bartlomieju
Copy link
Member Author

We got #3662, #3936 and #4058 landed without need of DOMException - so I'm closing this issue for now keeping in mind that we might have to revisit this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant