Add failing uncaughtException test
authorRyan Dahl <ry@tinyclouds.org>
Mon, 30 Aug 2010 19:02:01 +0000 (12:02 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Mon, 30 Aug 2010 19:02:22 +0000 (12:02 -0700)
FIXME

test/simple/test-exception-handler2.js [new file with mode: 0644]

diff --git a/test/simple/test-exception-handler2.js b/test/simple/test-exception-handler2.js
new file mode 100644 (file)
index 0000000..f75bdae
--- /dev/null
@@ -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.');