]> git.wh0rd.org Git - tt-rss.git/commitdiff
showArticleInHeadlines: add exception handling
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 24 Aug 2007 07:56:13 +0000 (08:56 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 24 Aug 2007 07:56:13 +0000 (08:56 +0100)
viewfeed.js

index 21984467fc2bb887b36fcce9e685a19abdf1586e..9aad5e2921b38ff4f026a46e6afd0536487fddf4 100644 (file)
@@ -198,22 +198,27 @@ function render_article(article) {
 
 function showArticleInHeadlines(id) {
 
-       cleanSelected("headlinesList");
+       try {
 
-       var crow = document.getElementById("RROW-" + id);
-       var article_is_unread = crow.className.match("Unread");
-               
-       crow.className = crow.className.replace("Unread", "");
+               cleanSelected("headlinesList");
        
-       var upd_img_pic = document.getElementById("FUPDPIC-" + id);
-       
-       if (upd_img_pic) {
-               upd_img_pic.src = "images/blank_icon.gif";
-       }
-       
-       selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false);
-       markHeadline(id);
+               var crow = document.getElementById("RROW-" + id);
+               var article_is_unread = crow.className.match("Unread");
+                       
+               crow.className = crow.className.replace("Unread", "");
+               
+               var upd_img_pic = document.getElementById("FUPDPIC-" + id);
+               
+               if (upd_img_pic) {
+                       upd_img_pic.src = "images/blank_icon.gif";
+               }
+               
+               selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false);
+               markHeadline(id);
 
+       } catch (e) {
+               exception_error("showArticleInHeadlines", e);
+       }
 }
 
 function article_callback2(transport, id, feed_id) {