From 868d0ed27e4a1e9a2e19ff4ff959c139b279abb7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 24 Aug 2007 08:56:13 +0100 Subject: [PATCH] showArticleInHeadlines: add exception handling --- viewfeed.js | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) 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) { -- 2.39.5