Skip to content
Snippets Groups Projects
Commit a4d62d12 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Make load errors more specific to where they are coming from (file/url)

Also include the hash of the project in load errors from the server so we can debug them
parent 9becb7f7
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,10 @@ class GUI extends React.Component {
this.props.vm.stopAll();
}
render () {
if (this.state.loadingError) throw new Error(`Failed to load project: ${this.state.errorMessage}`);
if (this.state.loadingError) {
throw new Error(
`Failed to load project from server [id=${window.location.hash}]: ${this.state.errorMessage}`);
}
const {
children,
fetchingProject,
......
......@@ -76,7 +76,10 @@ class ProjectLoader extends React.Component {
);
}
render () {
if (this.state.loadingError) throw new Error(`Failed to load project: ${this.state.errorMessage}`);
if (this.state.loadingError) {
throw new Error(
`Failed to load project from file: ${this.state.errorMessage}`);
}
const {
/* eslint-disable no-unused-vars */
children,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment