async/await improvements
Benjamin Gruenbaum
inglor at gmail.com
Wed Nov 12 10:52:48 PST 2014
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 <longster at gmail.com> wrote:
>
> On Wed, Nov 12, 2014 at 12:11 PM, Jussi Kalliokoski
> <jussi.kalliokoski at 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?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141112/2fcde82b/attachment.html>
More information about the es-discuss
mailing list