From: Charles Ofoegbu Date: Mon, 17 Nov 2014 13:45:23 +0000 (+0000) Subject: JAL-1043 patch to show warning dialog when webservice exception is thrown X-Git-Tag: Jalview_2_9~140^2~7^2 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=62eb845d2933c7f597b38ed1c3151528cbdce5cd JAL-1043 patch to show warning dialog when webservice exception is thrown --- diff --git a/src/jalview/ws/jws2/JabaWsServerQuery.java b/src/jalview/ws/jws2/JabaWsServerQuery.java index 2eb484b..6cca61b 100644 --- a/src/jalview/ws/jws2/JabaWsServerQuery.java +++ b/src/jalview/ws/jws2/JabaWsServerQuery.java @@ -24,12 +24,15 @@ package jalview.ws.jws2; import jalview.bin.Cache; +import jalview.gui.Desktop; import jalview.ws.jws2.jabaws2.Jws2Instance; import jalview.ws.jws2.jabaws2.Jws2InstanceFactory; import java.util.HashSet; import java.util.Set; +import javax.swing.JOptionPane; + import compbio.data.msa.Category; import compbio.data.msa.JABAService; import compbio.ws.client.Jws2Client; @@ -131,8 +134,13 @@ public class JabaWsServerQuery implements Runnable // svccategories.toString()); } - } catch (Exception ex) + } catch (javax.xml.ws.WebServiceException ex) { + JOptionPane + .showInternalMessageDialog( + Desktop.desktop, + "Exception whilst trying to access the webservice registry:", + "Webservice glitch", JOptionPane.WARNING_MESSAGE); System.err.println("Exception whilst trying to get at registry:"); ex.printStackTrace(); // if that failed, then we are probably working with a JABAWS1 server. @@ -144,6 +152,10 @@ public class JabaWsServerQuery implements Runnable srv_set.add(srv); } } + catch (Exception ex) + { + ex.printStackTrace(); + } for (Category cat : categories) { for (Services srv : cat.getServices())