Re: [whatwg] Notifications: making requestPermission() return a promise

On Wed, 1 Oct 2014, Domenic Denicola wrote:
> > 
> > This sort of behavior makes promise rejection essentially worthless.
> 
> They are as "worthless" as exceptions.

Some exceptions _are_ "worthless", as witnessed by the fact that nobody 
ever tries to catch them. For example, TypeError.

This is why I've argued before that these worthless exceptions should 
continue to be real exceptions even in the Promise case.

Incidentally, this bug and this comment in particular are quite relevant 
to this thread (regarding how to design an API with promises):

   https://www.w3.org/Bugs/Public/show_bug.cgi?id=25472#c18

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 1 October 2014 23:44:56 UTC