Skip to content

Instantly share code, notes, and snippets.

@mciparelli
Created July 17, 2013 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mciparelli/6022840 to your computer and use it in GitHub Desktop.
Save mciparelli/6022840 to your computer and use it in GitHub Desktop.
generators
run(function* (gen) {
while (true) {
try {
yield request('http://www.unexistanturl.com', gen());
} catch (err) {
debug(err);
}
}
})
@mciparelli
Copy link
Author

I dunno why it enters catch block just once :S @creationix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment