diff --git a/commands.js b/commands.js index ba6b4c6..bd61c4d 100644 --- a/commands.js +++ b/commands.js @@ -160,7 +160,7 @@ export default { try { msg = irc.parseMessage(args.join(" ")); } catch (err) { - throw new Error("failed to parse IRC command: " + err.message); + throw new Error("Failed to parse IRC command: " + err.message); } getActiveClient(app).send(msg); }, diff --git a/components/app.js b/components/app.js index 6d3b706..7b30b95 100644 --- a/components/app.js +++ b/components/app.js @@ -945,8 +945,8 @@ export default class App extends Component { try { cmd.execute(this, args); } catch (error) { - console.error("Failed to execute command '" + name + "'", error); - this.setState({ error }); + console.error("Failed to execute command '" + name + "':", error); + this.setState({ error: error.message }); } }