Adds handleUncaughtExceptions option that allows disabling of Screen's uncaughtException handler
This commit is contained in:
parent
458e4dfdea
commit
b945d5c734
|
@ -361,11 +361,13 @@ function Screen(options) {
|
||||||
|
|
||||||
this._maxListeners = Infinity;
|
this._maxListeners = Infinity;
|
||||||
|
|
||||||
process.on('uncaughtException', function(err) {
|
if (this.options.handleUncaughtExceptions !== false) {
|
||||||
reset();
|
process.on('uncaughtException', function(err) {
|
||||||
if (err) console.error(err.stack ? err.stack + '' : err + '');
|
reset();
|
||||||
return process.exit(1);
|
if (err) console.error(err.stack ? err.stack + '' : err + '');
|
||||||
});
|
return process.exit(1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
process.on('SIGTERM', function() {
|
process.on('SIGTERM', function() {
|
||||||
return process.exit(0);
|
return process.exit(0);
|
||||||
|
|
Loading…
Reference in New Issue