Skip to content

Instantly share code, notes, and snippets.

@tjfontaine
Created October 24, 2014 17:28
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 tjfontaine/d731924ac525450df318 to your computer and use it in GitHub Desktop.
Save tjfontaine/d731924ac525450df318 to your computer and use it in GitHub Desktop.
var d = require('domain').create();
d.run(function() {
process.nextTick({
throw new Error("hello");
});
});
d.on('error', function(e) {
assert.strictEqual(e.message, 'hello');
throw new Error('goodbye');
});
/* separate process
process.on('uncaughtException', function(e2) {
assert.strictEqual(e2.message, 'goodbye');
});
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment