Skip to content

Commit

Permalink
Improved error reporting when a PHYX file could not be parsed.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav committed Apr 5, 2018
1 parent c6282fd commit 8e59d88
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/curation-tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ var vm = new Vue({

$.getJSON(url, function(data) {
display_testcase(data);
}).fail(function(error) {
console.log("Could not load PHYX file '", url, "': ", error);
if(error.status == 200) {
alert("Could not load PHYX file '" + url + "': file malformed, see console for details.");
} else {
alert("Could not load PHYX file '" + url + "': server error " + error.status + " " + error.statusText);
}
});
},

Expand Down

0 comments on commit 8e59d88

Please sign in to comment.