Skip to content

Instantly share code, notes, and snippets.

@cxreg
Created December 27, 2012 19:44
Show Gist options
  • Save cxreg/4391360 to your computer and use it in GitHub Desktop.
Save cxreg/4391360 to your computer and use it in GitHub Desktop.
var d = require("domain");
setTimeout(function() {
console.log('domain stack length is now ' + d._stack.length);
}, 100);
d.create().run(function() {
d.create().run(function() {
d.create().run(function() {
d.create().on("error", function(e) {
console.log("caught " + e)
}).run(function() {
throw new Error("died")
})
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment