-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Most TryCatch blocks have SetVerbose flag on, this tells V8 to report uncaught exceptions to debugger. FatalException handler is called from V8 Message listener instead from the place where TryCatch was used. Otherwise uncaught exceptions are logged twice. See comment in `deps/v8/include/v8.h` for explanation of SetVerbose flag: > By default, exceptions that are caught by an external exception > handler are not reported. Call SetVerbose with true on an > external exception handler to have exceptions caught by the > handler reported as if they were not caught. The flag is used by `Isolate::ShouldReportException()`, which is called by `Isolate::DoThrow()` to decide whether an exception is considered uncaught.
- Loading branch information
1 parent
4bc024d
commit c16963b
Showing
9 changed files
with
211 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var domain = require('domain'); | ||
|
||
var d = domain.create(); | ||
d.on('error', function(err) { | ||
console.log('[ignored]', err.stack); | ||
}); | ||
|
||
d.run(function() { | ||
setImmediate(function() { | ||
throw new Error('in domain'); | ||
}); | ||
}); |
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,2 @@ | ||
console.log('going to throw an error'); | ||
throw new Error('global'); |
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,2 @@ | ||
console.log('parse error on next line'); | ||
var a = '; |
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,2 @@ | ||
console.log('require fails on next line'); | ||
require('./parse-error-mod.js'); |
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,3 @@ | ||
setTimeout(function() { | ||
throw new Error('timeout'); | ||
}, 10); |
Oops, something went wrong.