Bail and log why if door 'io' config is bad
This commit is contained in:
parent
62bcb8055a
commit
2a0ae05c45
|
@ -196,7 +196,11 @@ exports.getModule = class AbracadabraModule extends MenuModule {
|
||||||
|
|
||||||
const doorTracking = trackDoorRunBegin(this.client, this.config.name);
|
const doorTracking = trackDoorRunBegin(this.client, this.config.name);
|
||||||
|
|
||||||
this.doorInstance.run(exeInfo, () => {
|
this.doorInstance.run(exeInfo, err => {
|
||||||
|
if (err) {
|
||||||
|
Log.error(`Error running "${this.config.name}": ${err.message}`);
|
||||||
|
}
|
||||||
|
|
||||||
trackDoorRunEnd(doorTracking);
|
trackDoorRunEnd(doorTracking);
|
||||||
this.decrementActiveDoorNodeInstances();
|
this.decrementActiveDoorNodeInstances();
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,8 @@ module.exports = class Door {
|
||||||
|
|
||||||
if ('socket' === this.io && !this.sockServer) {
|
if ('socket' === this.io && !this.sockServer) {
|
||||||
return cb(Errors.UnexpectedState('Socket server is not running'));
|
return cb(Errors.UnexpectedState('Socket server is not running'));
|
||||||
|
} else if ('stdio' !== this.io) {
|
||||||
|
return cb(Errors.Invalid(`"${this.io}" is not a valid io type!`));
|
||||||
}
|
}
|
||||||
|
|
||||||
const cwd = exeInfo.cwd || paths.dirname(exeInfo.cmd);
|
const cwd = exeInfo.cwd || paths.dirname(exeInfo.cmd);
|
||||||
|
|
Loading…
Reference in New Issue