[Bug 25048] consider whether an IDL attribute of type Promise<T> should catch exceptions and wrap them up as a rejected Promise like they are for operations

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25048

Domenic Denicola <domenic@domenicdenicola.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |domenic@domenicdenicola.com

--- Comment #2 from Domenic Denicola <domenic@domenicdenicola.com> ---
In general, anytime someone is expecting to interface with an asynchronous API,
they are expecting asynchronous errors, which are caught via `.catch(e =>
...)`. It is very surprising if a synchronous error is thrown. If an API is
known to cause both types of errors, you need both `.catch(e => ...)` and
`catch(e) { ... }`, which is frustrating.

So yes, I think this change would make sense. I'm not sure under what
situations it would get triggered---how exception-prone are the operations
performed by getters, usually?---but philosophically, it's definitely
desirable.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 14 March 2014 02:24:39 UTC