forked from nodejs/node-v0.x-archive
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 'uncaughtException' for top level exceptions
Done by not evaluating the code in the first tick. This breaks one test in test-error-reporting.js but I believe this to be a V8 error and I have reported it in http://code.google.com/p/v8/issues/detail?id=764
- Loading branch information
Showing
5 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require('../common') | ||
|
||
process.addListener('uncaughtException', function (err) { | ||
puts('Caught exception: ' + err); | ||
}); | ||
|
||
setTimeout(function () { | ||
puts('This will still run.'); | ||
}, 500); | ||
|
||
// Intentionally cause an exception, but don't catch it. | ||
nonexistentFunc(); | ||
puts('This will not run.'); |