changeset 338:931e1abda61d

change a method of catching error.
author oc
date Fri, 06 Feb 2015 16:36:12 +0900
parents c455b05f163b
children 4713559f5838
files src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncProtocol.java
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncProtocol.java	Fri Feb 06 16:14:46 2015 +0900
+++ b/src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncProtocol.java	Fri Feb 06 16:36:12 2015 +0900
@@ -50,14 +50,9 @@
         }
     }
 
-    public void connectTo(String hostname, int port,int leaderFlag, short yourId) {
+    public void connectTo(String hostname, int port,int leaderFlag, short yourId) throws IOException {
         TreeCommand command = leaderFlag == 1 ? TreeCommand.CONNECT_TO_AS_LEADER : TreeCommand.CONNECT_TO;
-        try {
-            sendWithHostAndPort(command, hostname, port, yourId);
-        } catch (IOException e) {
-            e.printStackTrace();
-            System.out.println("cannot send connectTo");
-        }
+        sendWithHostAndPort(command, hostname, port, yourId);
     }
 
     public void lostParent(String hostname, int port) {