Merge pull request #59 from beardtree/handle-uncaught-exceptions
Adds handleUncaughtExceptions option that allows disabling of Screen's uncaughtException handler
This commit is contained in:
commit
47ead5ea93
|
@ -361,11 +361,13 @@ function Screen(options) {
|
|||
|
||||
this._maxListeners = Infinity;
|
||||
|
||||
if (this.options.handleUncaughtExceptions !== false) {
|
||||
process.on('uncaughtException', function(err) {
|
||||
reset();
|
||||
if (err) console.error(err.stack ? err.stack + '' : err + '');
|
||||
return process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
process.on('SIGTERM', function() {
|
||||
return process.exit(0);
|
||||
|
|
Loading…
Reference in New Issue