Skip to content

Instantly share code, notes, and snippets.

@sam-github
Created January 7, 2014 23:41
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 sam-github/8309001 to your computer and use it in GitHub Desktop.
Save sam-github/8309001 to your computer and use it in GitHub Desktop.
var domain = require('domain');
d = domain.create();
d.enter()
d.on('error', function(er) {
d.exit();
console.log('hmm, er');
process.nextTick(function() {
throw er;
});
});
throw Error('BANG');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment