In my year long experience with large code bases using Bluebird promises which 
do unhandled rejection tracking - I haven't had a single false positive or 
false negative.

Adding error handlers asynchronously is in practice extremely rare.

> On Nov 12, 2014, at 19:15, 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?
> 
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to