Skip to content

Commit

Permalink
fix: Add more help to errors
Browse files Browse the repository at this point in the history
Issue #7
  • Loading branch information
schw4rzlicht committed Jun 12, 2020
1 parent 2ee8af3 commit d7c9103
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/Twitch2Ma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default class Twitch2Ma extends EventEmitter {
ors: "\r\n",
})
.catch(() => {
throw new TelnetError("Could not connect to desk!")
throw new TelnetError("Could not connect to desk! Check Telnet enabled, MA IP address and firewall " +
"settings if using onPC!");
})
.then(() => this.telnetLogin())
.then(() => this.initTwitch());
Expand All @@ -93,7 +94,7 @@ export default class Twitch2Ma extends EventEmitter {
if (message.match(`Logged in as User '${this.config.ma.user}'`)) {
this.emit(this.onTelnetConnected, this.config.ma.host, this.config.ma.user);
} else {
throw new TelnetError(`Could not log into the desk as user ${this.config.ma.user}!`);
throw new TelnetError(`Could not log into the desk as user ${this.config.ma.user}! Check password!`);
}
});
}
Expand Down Expand Up @@ -156,7 +157,7 @@ export default class Twitch2Ma extends EventEmitter {
this.chatClient.say(channel, reason.viewerMessage);
this.emit(this.onPermissionDenied, channel, user, reason.name);
})
.catch(() => this.stopWithError(new TelnetError("Sending telnet command failed!")));
.catch(() => this.stopWithError(new TelnetError("Sending telnet command failed! Is MA still running?")));
}
}
}
Expand Down

0 comments on commit d7c9103

Please sign in to comment.