]> git.wh0rd.org - tt-rss.git/blobdiff - viewfeed.js
check for backend-returned fatal errors in major callbacks
[tt-rss.git] / viewfeed.js
index 513350497460f0de0ad8f1e5564129d560600dab..0f5345b9bfdd44ea16998bfb4f7b3d3c3f47d958 100644 (file)
@@ -39,7 +39,7 @@ function catchup_callback2(transport, callback) {
                        setTimeout(callback, 10);       
                }
        } catch (e) {
-               exception_error("catchup_callback2", e);
+               exception_error("catchup_callback2", e, transport);
        }
 }
 
@@ -67,6 +67,8 @@ function headlines_callback2(transport, feed_cur_page) {
 
                debug("headlines_callback2 [page=" + feed_cur_page + "]");
 
+               if (!transport_error_check(transport)) return;
+
                clean_feed_selections();
        
                var is_cat = false;
@@ -234,7 +236,7 @@ function headlines_callback2(transport, feed_cur_page) {
                remove_splash();
 
        } catch (e) {
-               exception_error("headlines_callback2", e);
+               exception_error("headlines_callback2", e, transport);
        }
 }
 
@@ -290,7 +292,7 @@ function showArticleInHeadlines(id) {
                        view_mode = document.forms['main_toolbar_form'].view_mode;      
                        view_mode = view_mode[view_mode.selectedIndex].value;
                } catch (e) {
-                       exception_error("showArticleInHeadlines/viewmode", e, true);
+                       //
                }
 
                if (upd_img_pic && upd_img_pic.src.match("updated.png")) {
@@ -327,6 +329,8 @@ function article_callback2(transport, id, feed_id) {
 
                if (transport.responseXML) {
 
+                       if (!transport_error_check(transport)) return;
+
                        debug("looking for articles to cache...");
 
                        var articles = transport.responseXML.getElementsByTagName("article");
@@ -386,7 +390,7 @@ function article_callback2(transport, id, feed_id) {
 
                notify("");
        } catch (e) {
-               exception_error("article_callback2", e);
+               exception_error("article_callback2", e, transport);
        }
 }
 
@@ -535,6 +539,9 @@ function toggleMark(id, client_only, no_effects) {
                }
        
                var mark_img = document.getElementById("FMPIC-" + id);
+
+               if (!mark_img) return;
+
                var vfeedu = document.getElementById("FEEDU--1");
                var crow = document.getElementById("RROW-" + id);
        
@@ -586,6 +593,9 @@ function togglePub(id, client_only, no_effects) {
                }
        
                var mark_img = document.getElementById("FPPIC-" + id);
+
+               if (!mark_img) return;
+
                var vfeedu = document.getElementById("FEEDU--2");
                var crow = document.getElementById("RROW-" + id);