On Wed, Nov 12, 2014 at 12:15 PM, James Long <longs...@gmail.com> wrote:
> On Wed, Nov 12, 2014 at 12:11 PM, Jussi Kalliokoski
> <jussi.kallioko...@gmail.com> wrote:
>> Actually that already works, at least in Chrome, if you execute
>>
>> (function () {
>>   return new Promise(function (resolve, reject) {
>>     reject(new Error("foo"));
>>   });
>> }());
>>
>
> That's a false positive though. It does the same thing with this:
>
> var x = (function () {
>   return new Promise(function (resolve, reject) {
>     reject(new Error("foo"));
>   });
> }());
>
> When you could later on attach an error handler to x. We are starting
> to favor false positives in order to get somewhat immediate error
> logging. Also none of this helps production code unless we also have
> something like onUncaughtPromiseException?

What happens if you attach an error handler to x.  Does the console
warning go away?  (It should.)
 --scott
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to