]> source.dussan.org Git - tigervnc.git/commitdiff
make sure we actually throw caught execptions in java viewer
authorBrian Hinz <bphinz@users.sourceforge.net>
Thu, 16 Feb 2012 12:31:38 +0000 (12:31 +0000)
committerBrian Hinz <bphinz@users.sourceforge.net>
Thu, 16 Feb 2012 12:31:38 +0000 (12:31 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4856 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/com/tigervnc/network/SocketDescriptor.java
java/com/tigervnc/network/TcpListener.java
java/com/tigervnc/rfb/CSecurityTLS.java

index d4970c61deedb5eb183c646e268e83122bbf0365..2a4c6d815ebcf5a92de520e54566fd71b35364e7 100644 (file)
@@ -185,7 +185,7 @@ public class SocketDescriptor extends SocketChannel
       channel.configureBlocking(false);
       selector = Selector.open();
     } catch (java.io.IOException e) {
-      System.out.println(e.toString());
+      throw new Exception(e.toString());
     }
     try {
       channel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE );
index 63a2ff192cee31ece41ae85b817f78fdd0c3d2e0..4cc8c0da77a52c1d8cff329ac31d1393d9a26cec 100644 (file)
@@ -116,8 +116,7 @@ public class TcpListener extends SocketListener  {
           return null;
       }
     } catch (IOException e) {
-      //throw SocketException("unable to accept new connection", errorNumber);
-      System.out.println(e.toString());
+      throw new SocketException("unable to accept new connection: "+e.toString());
     }
 
     // Disable Nagle's algorithm, to reduce latency
index 3d89fd32b503e67fc68a302715d24977c1ae7f8b..33449485824e1623ec5558fca0f44ae796804d8f 100644 (file)
@@ -128,7 +128,7 @@ public class CSecurityTLS extends CSecurity {
     try {
       manager = new SSLEngineManager(engine, is, os);
     } catch(java.lang.Exception e) {
-      System.out.println(e.toString());
+      throw new Exception(e.toString());
     }
 
     try {