Re: [whatwg/webidl] Allow DOMException subclasses to be used as exceptions (PR #1211)

> > It's not clear to me whether a spec would be allowed to create a DOMException with a new error name (ie, not from that table) directly, without defining an interface that inherits from DOMException.
> 
> The intention is you are not supposed to do that. And you are not supposed to define subclasses, just because you want a new name. Instead you are supposed to come coordinate on the Web IDL repo to determine if any existing names will suit your purpose, and if not, send a PR to add it to the table.

A spec will probably want error names that are rather specific to its problem space and thus not generally useful. I suppose the criteria for adding entries to this table is that the error name could be useful in several different contexts or problem domains? Would be good to clarify the criteria or rationale for adding new ones.

I also find it a bit confusing that a spec that defines a new interface inheriting from DOMException will also define a new, matching, error name, but that error name won't be present in that table. Or will it?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1211#issuecomment-1273375066
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1211/c1273375066@github.com>

Received on Monday, 10 October 2022 14:09:53 UTC