Skip to content

Instantly share code, notes, and snippets.

@takaheraw
Created January 4, 2013 11:14
Show Gist options
  • Save takaheraw/4451801 to your computer and use it in GitHub Desktop.
Save takaheraw/4451801 to your computer and use it in GitHub Desktop.
var domain = require('domain');
var events = require('events');
var d = domain.create();
d.on('error', function(e){
console.error('d:', e.message);
});
d.run(function(){
var ee = new events.EventEmitter();
ee.emit('error', new Error('emitted error'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment