Last active
August 29, 2015 14:08
-
-
Save misterdjules/7108fa0bc14280b36d4d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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'); | |
| }); |
This file contains hidden or 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 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