Add some trace in error paths.
[TD_SR.git] / TD2 / client / Main.java
index 08300b7139c8f0b0236905b11561d8a19822862c..82fbfc975b563213df2c108f1bc0b23a43711fed 100644 (file)
@@ -25,6 +25,7 @@ public class Main {
                }
                catch (IOException e) {
                        System.err.println("IOException: " + e);
+                       e.printStackTrace();
                }
                finally {
                        client.closeRWIO();
@@ -34,6 +35,7 @@ public class Main {
                                }
                                catch (IOException e) {
                                        System.err.println("IOException: " + e);
+                                       e.printStackTrace();
                                }
                        }
                }
@@ -58,6 +60,7 @@ public class Main {
                }
                catch (Exception e) {
                        System.err.println("Exception: " + e);
+                       e.printStackTrace();
                }
                finally {
                        try {
@@ -78,7 +81,7 @@ public class Main {
                Thread thR = null;
 
                try {
-                       client = new SocketClient();
+                       client = new SocketClient(true);
                        thS = new Thread(new ThreadClientoSend(client));
                        thR = new Thread(new ThreadClientoReceive(client));
                        thS.setName("thoS");
@@ -88,6 +91,7 @@ public class Main {
                }
                catch (Exception e) {
                        System.err.println("Exception: " + e);
+                       e.printStackTrace();
                }
                finally {
                        try {