On Wed, Nov 12, 2014 at 4:07 PM, James Long <[email protected]> wrote: > Maybe this would be resolved if you could answer this: how do you mark > an async function to be a top-level one? I don't see anywhere that > says "I don't return a promise, I want errors inside of me to > literally throw. I am an all-powerful top-level consumer of async > stuff"). Seems like that would need extra syntax?
There is currently no way to do so. If there was, they still wouldn't "literally throw", because again, that's impossible - by the time the promise rejects, it may be another turn entirely, and the program counter is long past the callsite. The best it can do is be an automatically-unhandled error, caught by window.onerror. ~TJ _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

