Skip to content

Instantly share code, notes, and snippets.

@crtr0
Last active December 19, 2015 21:59
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 crtr0/6024481 to your computer and use it in GitHub Desktop.
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