[Bug 26517] Methods that return promises are unable to throw exceptions

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

Joshua Bell <jsbell@google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsbell@google.com

--- Comment #21 from Joshua Bell <jsbell@google.com> ---
(In reply to Olli Pettay from comment #20)
> This inconsistency in rather horrible. 

And yet, we received exactly that complaint from Indexed DB users who ran into
that issue with an API that works the way you propose (both synchronous and
asynchronous failures):

var request = store.put(userdata, key);
request.onsuccess = ...;
request.onerror = ...;

"What do you mean I *also* need to catch exceptions from put() if the userdata
is something that can't be cloned? I already have an error handler - make it
consistent!"

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

Received on Tuesday, 7 October 2014 16:19:07 UTC