Skip to content

Instantly share code, notes, and snippets.

@crtr0
Last active December 19, 2015 21:59
Show Gist options
  • Select an option

  • Save crtr0/6024481 to your computer and use it in GitHub Desktop.

Select an option

Save crtr0/6024481 to your computer and use it in GitHub Desktop.
var d = domain.create();
d.on("error", function(error) {
// handle it
});
d.run(function() {
// deeply nested and possibly async code
});
try {
// deeply nested and possibly async code
}
catch (error) {
// handle it
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment