[whatwg/webidl] Allowing throwing an exception with a specific message (Issue #1374)

### What problem are you trying to solve?

`fetch()` throws a `TypeError` and callers distant from the `fetch()` call are having a hard time. As we cannot extend `TypeError`, the current best idea is to standardize on the message: https://github.com/whatwg/fetch/issues/526.

If anyone has better ideas I'd very much appreciate them.

### What solutions exist today?

None.

### How would you solve it?

Allow create and throw to be passed an optional message argument.

### Anything else?

This vaguely relates to #1024.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1374
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1374@github.com>

Received on Wednesday, 8 November 2023 10:16:25 UTC