From 635986e4338cf34cf8e1abc4343ffd69d109bb4e Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 30 Aug 2010 12:02:01 -0700 Subject: [PATCH] Add failing uncaughtException test FIXME --- test/simple/test-exception-handler2.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/simple/test-exception-handler2.js diff --git a/test/simple/test-exception-handler2.js b/test/simple/test-exception-handler2.js new file mode 100644 index 0000000000..f75bdaea11 --- /dev/null +++ b/test/simple/test-exception-handler2.js @@ -0,0 +1,11 @@ +process.on('uncaughtException', function (err) { + console.log('Caught exception: ' + err); +}); + +setTimeout(function () { + console.log('This will still run.'); +}, 500); + +// Intentionally cause an exception, but don't catch it. +nonexistentFunc(); +console.log('This will not run.');