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

Simple exceptions “apart from...” list is incomplete #1314

Open
bathos opened this issue Jun 3, 2023 · 1 comment
Open

Simple exceptions “apart from...” list is incomplete #1314

bathos opened this issue Jun 3, 2023 · 1 comment

Comments

@bathos
Copy link
Contributor

bathos commented Jun 3, 2023

Web IDL enumerates the ES Error object constructor names that are usable in Web IDL for simple exceptions, but the text that follows the list also enumerates those which aren’t:

These correspond to all of the ECMAScript error objects (apart from SyntaxError and Error, which are deliberately omitted as they are reserved for use by the ECMAScript parser and by authors, respectively).

This list is no longer complete because of AggregateError. Options include:

  1. Adding AggregateError to the explicit exclusions list, and future additions as well, as they are introduced
  2. Restructuring the sentence so that it doesn’t claim to be exhaustive
  3. Changing the references to “Error object” to “NativeError object”, in which case the only excluded item would be “SyntaxError”. (The odds of new NativeError objects being introduced seems lower than that of new Error objects being introduced.)

(Spun off from exception-related PR feedback because this was a pre-existing issue in the text.)

@domenic
Copy link
Member

domenic commented Jun 5, 2023

I think we actually want to allow specs to create AggregateErrors. E.g. whatwg/streams#1134 . We probably need to add special wrappers for that though...

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

No branches or pull requests

3 participants
@domenic @bathos and others