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
|
@ -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…
Add table
Add a link
Reference in a new issue