From: jprocter Date: Fri, 15 Aug 2008 10:02:16 +0000 (+0000) Subject: catch invalid URL link exception properly X-Git-Tag: Release_2_4~22 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d442a525b14f6dc79da8054226ca593a0aee315b;p=jalview.git catch invalid URL link exception properly --- diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 97f7cba..3aa08aa 100755 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -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());