mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-28 18:26:19 -05:00
Improve command error reporting
state.error is expected to be a String, not an Error.
This commit is contained in:
parent
d5e21097f8
commit
b8c4bb3112
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue