From: Andrew Dolgov Date: Fri, 24 Aug 2007 07:56:13 +0000 (+0100) Subject: showArticleInHeadlines: add exception handling X-Git-Tag: 1.2.15~63 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=868d0ed27e4a1e9a2e19ff4ff959c139b279abb7;p=tt-rss.git showArticleInHeadlines: add exception handling --- diff --git a/viewfeed.js b/viewfeed.js index 21984467..9aad5e29 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -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) {