mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
ef54777fa5
See: 635986e433
22 lines
451 B
JavaScript
22 lines
451 B
JavaScript
common = require("../common");
|
|
assert = common.assert
|
|
|
|
process.on('uncaughtException', function (err) {
|
|
console.log('Caught exception: ' + err);
|
|
});
|
|
|
|
var timeoutFired = false;
|
|
setTimeout(function () {
|
|
console.log('This will still run.');
|
|
timeoutFired = true;
|
|
}, 500);
|
|
|
|
process.on('exit', function() {
|
|
assert.ok(timeoutFired);
|
|
});
|
|
|
|
// Intentionally cause an exception, but don't catch it.
|
|
nonexistentFunc();
|
|
console.log('This will not run.');
|
|
|