Improve command error reporting

state.error is expected to be a String, not an Error.
This commit is contained in:
Simon Ser committed 2021-05-27 11:26:42 +02:00
1 parent d5e21097f8
commit b8c4bb3112
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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 });
}
}