-
-
Save dscape/2135922 to your computer and use it in GitHub Desktop.
This file contains 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
function f() { | |
throw new Error('def'); | |
} | |
process.on('uncaughtException', function(e) { | |
console.log('uncaught exception', e); | |
f(); | |
}); | |
f(); |
This file contains 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
function g() { | |
process.nextTick(function() { throw new Error('def'); }); | |
} | |
process.on('uncaughtException', function(e) { | |
console.log('uncaught exception', e); | |
g(); | |
}); | |
g(); |
This file contains 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
$ node index.js | |
uncaught exception [Error: def] | |
uncaught exception [Error: def] | |
uncaught exception [Error: def] | |
uncaught exception [Error: def] | |
uncaught exception [Error: def] | |
... continues |
This file contains 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
$ node index.js | |
uncaught exception [Error: def] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment