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