Re: [whatwg/dom] Add a way to identify Abort errors originating from controllers (Issue #1033)

I think the premise here is wrong. If the controller wants to send an "AbortError" DOMException, knowing some consumers will discriminate based on that, it can do so. But if it wants to send a TypeError, knowing some consumers are not specifically watching for that, it can. You should generally not write code that assumes all controller-caused errors are "third state" abort errors. The signal is telling you about an error, but that error has the usual semantics based on its type: some are "third state" abort errors, some are fatal failures of a different sort, some are timeouts, etc.

Perhaps it would have been better if AbortSignal were named ExceptionSignal, but the historical naming here shouldn't cause people to assume all controller-initiated exceptions are treated the same way (e.g. ignored).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1033#issuecomment-974856476

Received on Sunday, 21 November 2021 17:09:05 UTC