Catch errors while spawning processes and log to console

This commit is contained in:
Björn Dahlgren 2017-04-01 12:46:39 +02:00
parent 8bb65aedcd
commit bf7d6ed08c

View File

@ -158,6 +158,10 @@ Server.prototype.start = function() {
self.emit('state');
});
instance.on('error', function (err) {
console.log(err);
});
this.pid = instance.pid;
this.instance = instance;
this.queryStatusInterval = setInterval(function () {
@ -190,6 +194,10 @@ Server.prototype.start = function() {
self.headlessInstance = null;
});
headlessInstance.on('error', function (err) {
console.log(err);
});
self.headlessInstance = headlessInstance;
}