From bb3423cf99b7bcb39e6737ae782e01df3136236c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 30 Mar 2006 07:27:03 +0100 Subject: [PATCH] quickMenuGo: try/catch block --- tt-rss.js | 94 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/tt-rss.js b/tt-rss.js index 08fdb945a..06f9fadc0 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -487,56 +487,58 @@ function quickMenuChange() { } function quickMenuGo(opid) { + try { - - if (opid == "qmcPrefs") { - gotoPreferences(); - } - - if (opid == "qmcSearch") { - displayDlg("search", getActiveFeedId()); - return; - } - - if (opid == "qmcAddFeed") { - displayDlg("quickAddFeed"); - return; - } - - if (opid == "qmcRemoveFeed") { - var actid = getActiveFeedId(); - - if (!actid) { - notify("Please select some feed first."); - return; - } - - if (confirm("Remove current feed?")) { - qfdDelete(actid); + if (opid == "qmcPrefs") { + gotoPreferences(); } - return; + if (opid == "qmcSearch") { + displayDlg("search", getActiveFeedId()); + return; + } + + if (opid == "qmcAddFeed") { + displayDlg("quickAddFeed"); + return; + } + + if (opid == "qmcRemoveFeed") { + var actid = getActiveFeedId(); + + if (!actid) { + notify("Please select some feed first."); + return; + } + + if (confirm("Remove current feed?")) { + qfdDelete(actid); + } + + return; + } + + if (opid == "qmcUpdateFeeds") { + scheduleFeedUpdate(true); + return; + } + + if (opid == "qmcCatchupAll") { + catchupAllFeeds(); + return; + } + + if (opid == "qmcShowOnlyUnread") { + toggleDispRead(); + return; + } + + if (opid == "qmcAddFilter") { + displayDlg("quickAddFilter", getActiveFeedId()); + } + } catch (e) { + exception_error("quickMenuGo", e); } - - if (opid == "qmcUpdateFeeds") { - scheduleFeedUpdate(true); - return; - } - - if (opid == "qmcCatchupAll") { - catchupAllFeeds(); - return; - } - - if (opid == "qmcShowOnlyUnread") { - toggleDispRead(); - return; - } - - if (opid == "qmcAddFilter") { - displayDlg("quickAddFilter", getActiveFeedId()); - } - } function qafAdd() {