Commit 4db45f6d authored by Jérome Perrin's avatar Jérome Perrin

GUI: Display an informative error message when saving to jIO fails

parent 927e8d70
...@@ -87,6 +87,14 @@ ...@@ -87,6 +87,14 @@
gadget.props.jio_key, gadget.props.jio_key,
"view_result" "view_result"
); );
}, function(reason){
// Very likely, we exceeded the quota of the local storage.
// Let's handle it with a more informative message.
alert("Could not save simulation results.Please check the simulation parameters or try to delete some models.\n\nError was:" + reason);
return gadget.whoWantsToDisplayThisDocument(
gadget.props.jio_key,
"view"
);
}) })
.push(function (url) { .push(function (url) {
return gadget.pleaseRedirectMyHash(url); return gadget.pleaseRedirectMyHash(url);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment