From d442a525b14f6dc79da8054226ca593a0aee315b Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 15 Aug 2008 10:02:16 +0000 Subject: [PATCH] catch invalid URL link exception properly --- src/jalview/gui/PopupMenu.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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()); -- 1.7.10.2