async/await improvements
James Long
longster at gmail.com
Wed Nov 12 09:15:55 PST 2014
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?
More information about the es-discuss
mailing list