Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var bluebird = require('bluebird');
var request = require('request');
bluebird.promisifyAll(request);
bluebird.longStackTraces();
var helper = bluebird.coroutine(function*() {
yield request.getAsync('http://google.com/');
throw new Error('something unexpected happened');
});
bluebird.coroutine(function*() {
yield helper();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.