Created
August 24, 2014 18:36
-
-
Save petehunt/f590b37541e43c760c94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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