Created
March 20, 2012 13:10
-
-
Save pgte/2135316 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
pedroteixeira:test pedroteixeira$ node test.js | |
uncaught exception [Error: abc1] | |
uncaught exception [Error: def] | |
uncaught exception [Error: abc2] | |
uncaught exception [Error: def] |
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
process.on('uncaughtException', function(e) { | |
console.log('uncaught exception', e); | |
(function() { | |
throw new Error('def'); | |
}()); | |
}); | |
setTimeout(function() { | |
throw new Error('abc1'); | |
}, 1000); | |
setTimeout(function() { | |
throw new Error('abc2'); | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment