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

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

--- Comment #13 from Ian 'Hixie' Hickson <ian@hixie.ch> ---
> If we get some in-between option, like "[throwOnInvalidInput]" or whatever,
> then some APIs might use this and others might not... then, as an author, you
> always need to check the API contract (so to wrap in try/catch)

No, you don't. Nobody puts every method call in a try-catch today, just like
nobody is going to be checking for a rejection on a promise for this kind of
bug.

As a developer you never need to look at what the API will do when you use it
incorrectly. You only need to use it correctly.

When you use it incorrectly, you should get an exception, the same way as when
you call the wrong API.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 14 August 2014 20:32:23 UTC