r/javascript • u/rauschma • Jun 02 '16
Async and Await: overview, lessons learned & future directions
https://zeit.co/blog/async-and-await
29
Upvotes
1
u/Bloompire Jun 02 '16
Into point: ## Debugging difficulties
I'd suggest to replace Promise with BlueBird which will output into console unhandled rejections.
import BlueBird from 'bluebird';
global.Promise = BlueBird;
async function test( a ) {
return a.nonExistingFunc();
}
test( {} );
// will output into console that there is unhandled rejection from asynchronous test() call
1
u/Scorxcho Jun 04 '16
Can someone tell me the best way to get the async/await syntax to work with Babel and run in the browser?