Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save misterdjules/7108fa0bc14280b36d4d to your computer and use it in GitHub Desktop.

Select an option

Save misterdjules/7108fa0bc14280b36d4d to your computer and use it in GitHub Desktop.
var domain = require('domain');
var d = domain.create();
var fs = require('fs');
process.on('uncaughtException', function onUncaughtException() {
});
d.on('error', function() {
try {
throw new Error('Bar');
} catch (e) {
// Swallow the error
}
});
d.run(function doStuff() {
throw new Error('Foo');
});
var domain = require('domain');
var d = domain.create();
var fs = require('fs');
process.on('uncaughtException', function onUncaughtException() {
});
d.on('error', function() {
throw new Error('Bar');
});
d.run(function doStuff() {
throw new Error('Foo');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment