Re: [whatwg/webidl] Normative: Add DOMException cause (PR #1179)

I was in favor of the accessor for consistency with `message` (and `stack` in SpiderMonkey) + the unusualness of Web IDL constructs defining own data properties, but @ljharb’s explanation changed my mind. More reliable API contracts for _“whatever value was just thrown at me”_ is worth a lot more. DOMException is already a lil freaky anyway.

Also tho I sincerely hope nobody ends up needing to spot the distinction between `"cause" in new Error("", { cause: undefined })`  and `"cause" in new Error`, if they did need to and couldn’t, that’d be worse. Given `cause` would typically be a value the cause-bearing-error thrower is just passing along from possibly unrelated code, this might be your only signal that something more spooky’s going down.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1179#issuecomment-1239644331

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1179/c1239644331@github.com>

Received on Wednesday, 7 September 2022 16:52:37 UTC