]> git.wh0rd.org Git - tt-rss.git/commitdiff
quickMenuGo: try/catch block
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 30 Mar 2006 06:27:03 +0000 (07:27 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 30 Mar 2006 06:27:03 +0000 (07:27 +0100)
tt-rss.js

index 08fdb945af050b1872a783f4529f34dd609e6724..06f9fadc0cd1c0dafcd78e58be12d2cc85b3bf2f 100644 (file)
--- 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() {