add some RPC error reporting

master
Andrew Dolgov 19 years ago
parent 828a8ecc9a
commit bc18bcddc6

@ -307,6 +307,12 @@ if (!xmlhttp_rpc && typeof XMLHttpRequest!='undefined') {
function label_counters_callback() { function label_counters_callback() {
if (xmlhttp_rpc.readyState == 4) { if (xmlhttp_rpc.readyState == 4) {
if (!xmlhttp.responseXML) {
notify("label_counters_callback: backend did not return valid XML");
return;
}
var reply = xmlhttp_rpc.responseXML.firstChild; var reply = xmlhttp_rpc.responseXML.firstChild;
var f_document = parent.frames["feeds-frame"].document; var f_document = parent.frames["feeds-frame"].document;

@ -70,8 +70,18 @@ function refetch_callback() {
document.title = "Tiny Tiny RSS"; document.title = "Tiny Tiny RSS";
notify("All feeds updated."); notify("All feeds updated.");
if (!xmlhttp.responseXML) {
notify("refetch_callback: backend did not return valid XML");
return;
}
var reply = xmlhttp.responseXML.firstChild; var reply = xmlhttp.responseXML.firstChild;
if (!reply) {
notify("refetch_callback: backend did not return expected XML object");
return;
}
var f_document = window.frames["feeds-frame"].document; var f_document = window.frames["feeds-frame"].document;
for (var l = 0; l < reply.childNodes.length; l++) { for (var l = 0; l < reply.childNodes.length; l++) {

Loading…
Cancel
Save