mirror of https://github.com/lukechilds/node.git
Felix Geisendörfer
15 years ago
committed by
Ryan Dahl
3 changed files with 20 additions and 5 deletions
@ -1,11 +1,21 @@ |
|||||
|
common = require("../common"); |
||||
|
assert = common.assert |
||||
|
|
||||
process.on('uncaughtException', function (err) { |
process.on('uncaughtException', function (err) { |
||||
console.log('Caught exception: ' + err); |
console.log('Caught exception: ' + err); |
||||
}); |
}); |
||||
|
|
||||
|
var timeoutFired = false; |
||||
setTimeout(function () { |
setTimeout(function () { |
||||
console.log('This will still run.'); |
console.log('This will still run.'); |
||||
|
timeoutFired = true; |
||||
}, 500); |
}, 500); |
||||
|
|
||||
|
process.on('exit', function() { |
||||
|
assert.ok(timeoutFired); |
||||
|
}); |
||||
|
|
||||
// Intentionally cause an exception, but don't catch it.
|
// Intentionally cause an exception, but don't catch it.
|
||||
nonexistentFunc(); |
nonexistentFunc(); |
||||
console.log('This will not run.'); |
console.log('This will not run.'); |
||||
|
|
||||
|
Loading…
Reference in new issue