From 93464bcc33e966eb3c668363737dea5e10f3eb4d Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Thu, 16 Feb 2012 12:31:38 +0000 Subject: [PATCH] make sure we actually throw caught execptions in java viewer git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4856 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/com/tigervnc/network/SocketDescriptor.java | 2 +- java/com/tigervnc/network/TcpListener.java | 3 +-- java/com/tigervnc/rfb/CSecurityTLS.java | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/java/com/tigervnc/network/SocketDescriptor.java b/java/com/tigervnc/network/SocketDescriptor.java index d4970c61..2a4c6d81 100644 --- a/java/com/tigervnc/network/SocketDescriptor.java +++ b/java/com/tigervnc/network/SocketDescriptor.java @@ -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 ); diff --git a/java/com/tigervnc/network/TcpListener.java b/java/com/tigervnc/network/TcpListener.java index 63a2ff19..4cc8c0da 100644 --- a/java/com/tigervnc/network/TcpListener.java +++ b/java/com/tigervnc/network/TcpListener.java @@ -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 diff --git a/java/com/tigervnc/rfb/CSecurityTLS.java b/java/com/tigervnc/rfb/CSecurityTLS.java index 3d89fd32..33449485 100644 --- a/java/com/tigervnc/rfb/CSecurityTLS.java +++ b/java/com/tigervnc/rfb/CSecurityTLS.java @@ -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 { -- 2.39.5