Created
October 24, 2014 17:28
-
-
Save tjfontaine/d731924ac525450df318 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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