var co = require('co'); | |
var thunkify = require('thunkify'); | |
var request = require('request'); | |
var get = thunkify(request.get); | |
function *helper() { | |
yield get('http://google.com/'); | |
throw new Error('something unexpected happened'); | |
} | |
co(function *(){ | |
yield helper(); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment