diff --git a/src/main/java/com/metaweb/gridworks/commands/edit/CreateProjectCommand.java b/src/main/java/com/metaweb/gridworks/commands/edit/CreateProjectCommand.java index 1332724a7..57f4a91d8 100644 --- a/src/main/java/com/metaweb/gridworks/commands/edit/CreateProjectCommand.java +++ b/src/main/java/com/metaweb/gridworks/commands/edit/CreateProjectCommand.java @@ -55,7 +55,9 @@ public class CreateProjectCommand extends Command { redirect(response, "/project.html?project=" + project.id); } catch (Exception e) { - // TODO Auto-generated catch block + redirect(response, "/error.html?redirect=index.html&msg=" + + ParsingUtilities.encode("Failed to import file: " + e.getLocalizedMessage()) + ); e.printStackTrace(); } } diff --git a/src/main/webapp/error.html b/src/main/webapp/error.html new file mode 100644 index 000000000..97cea210e --- /dev/null +++ b/src/main/webapp/error.html @@ -0,0 +1,42 @@ + + + + + + Error - Gridworks + + + + + + + + + + +
+

Oops, something went wrong!

+

+

Redirecting you back to Gridworks' home page in 20 seconds ...

+
+ + + + \ No newline at end of file diff --git a/src/main/webapp/styles/error.css b/src/main/webapp/styles/error.css new file mode 100644 index 000000000..eb1457a7b --- /dev/null +++ b/src/main/webapp/styles/error.css @@ -0,0 +1,3 @@ +#body { + padding: 5em; +} \ No newline at end of file