Skip to content

Instantly share code, notes, and snippets.

@othiym23
Created November 6, 2012 02:12
Show Gist options
  • Save othiym23/4022112 to your computer and use it in GitHub Desktop.
Save othiym23/4022112 to your computer and use it in GitHub Desktop.
var domain = require('domain')
var d1 = domain.create();
var d2 = domain.create();
d1.on('error', function (error) { console.error('got error in outer domain') });
d2.on('error', function (error) { console.error('got error in inner domain') });
d1.run(function () {
process.nextTick(function () {
d2.run(function () {
var object;
process.nextTick(function () {
console.error(object.notfound);
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment