catch invalid URL link exception properly
authorjprocter <Jim Procter>
Fri, 15 Aug 2008 10:02:16 +0000 (10:02 +0000)
committerjprocter <Jim Procter>
Fri, 15 Aug 2008 10:02:16 +0000 (10:02 +0000)
src/jalview/gui/PopupMenu.java

index 97f7cba..3aa08aa 100755 (executable)
@@ -366,7 +366,13 @@ public class PopupMenu
       for (int i = 0; i < links.size(); i++)
       {
         String link = links.elementAt(i).toString();
-        UrlLink urlLink = new UrlLink(link);
+        UrlLink urlLink = null;
+        try {
+          urlLink = new UrlLink(link);
+        } catch (Exception foo) {
+          jalview.bin.Cache.log.error("Exception for URLLink '"+link+"'",foo);
+          continue;
+        };
         if (!urlLink.isValid())
         {
           jalview.bin.Cache.log.error(urlLink.getInvalidMessage());