Improve command error reporting
state.error is expected to be a String, not an Error.
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user