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.');