Commit 2666d34a authored by Romain Loth's avatar Romain Loth

graphexplorer: better exception reporting

parent 68cab3df
...@@ -83,12 +83,17 @@ $.ajax({ ...@@ -83,12 +83,17 @@ $.ajax({
MainFunction( Result ) MainFunction( Result )
}, },
error: function(exception) { error: function(exception) {
// console.warn(JSON.stringify(exception, null, 2)) if (exception.status && exception.responseJSON && exception.responseJSON.msg) {
showDialog(file, true, exception.status, exception.responseJSON.msg) showDialog(file, true, exception.status, exception.responseJSON.msg)
}
else {
showDialog(file, true, "unknown error", JSON.stringify(exception, null, 2))
}
} }
}); });
function showDialog(url, hasError, status, msg) { function showDialog(url, hasError, status, msg) {
// TODO use status
// console.log('FUN t.main:showDialog' + 'hasError:'+hasError) // console.log('FUN t.main:showDialog' + 'hasError:'+hasError)
// hide loader gif etc // hide loader gif etc
$("#semLoader").hide(); $("#semLoader").hide();
......
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