summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-03-30 07:27:03 +0100
committerAndrew Dolgov <[email protected]>2006-03-30 07:27:03 +0100
commitbb3423cf99b7bcb39e6737ae782e01df3136236c (patch)
tree9fad2c41177bef18409b57e4ad2736f486f6ae8c
parent8a414837ec3b4388ec20cc08329e9c0b0863c252 (diff)
quickMenuGo: try/catch block
-rw-r--r--tt-rss.js90
1 files changed, 46 insertions, 44 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.");
+ if (opid == "qmcPrefs") {
+ gotoPreferences();
+ }
+
+ if (opid == "qmcSearch") {
+ displayDlg("search", getActiveFeedId());
return;
}
-
- if (confirm("Remove current feed?")) {
- qfdDelete(actid);
+
+ if (opid == "qmcAddFeed") {
+ displayDlg("quickAddFeed");
+ return;
}
- return;
- }
-
- if (opid == "qmcUpdateFeeds") {
- scheduleFeedUpdate(true);
- return;
- }
-
- if (opid == "qmcCatchupAll") {
- catchupAllFeeds();
- return;
- }
-
- if (opid == "qmcShowOnlyUnread") {
- toggleDispRead();
- return;
- }
-
- if (opid == "qmcAddFilter") {
- displayDlg("quickAddFilter", getActiveFeedId());
+ 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);
}
-
}
function qafAdd() {