diff options
author | Brian Hinz <bphinz@users.sourceforge.net> | 2012-12-16 20:35:39 +0000 |
---|---|---|
committer | Brian Hinz <bphinz@users.sourceforge.net> | 2012-12-16 20:35:39 +0000 |
commit | 504d98fcaa0c9571e3fb011947fa1a1e1d263237 (patch) | |
tree | c1297c2f593f6871e2f9e9e77c12994b98e9ac0d /java/com/tigervnc/network/TcpSocket.java | |
parent | d93a26d665b18b0e779c524f54c7acdc18898b94 (diff) | |
download | tigervnc-504d98fcaa0c9571e3fb011947fa1a1e1d263237.tar.gz tigervnc-504d98fcaa0c9571e3fb011947fa1a1e1d263237.zip |
Make exception handling more user friendly. Not all exceptions are 'errors' (for example, exiting the server intentionally via the window manager's logoff button).
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5021 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/com/tigervnc/network/TcpSocket.java')
-rw-r--r-- | java/com/tigervnc/network/TcpSocket.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/com/tigervnc/network/TcpSocket.java b/java/com/tigervnc/network/TcpSocket.java index cdc05016..bd5fe2b2 100644 --- a/java/com/tigervnc/network/TcpSocket.java +++ b/java/com/tigervnc/network/TcpSocket.java @@ -108,7 +108,7 @@ public class TcpSocket extends Socket { try { ((SocketDescriptor)getFd()).close(); } catch (IOException e) { - throw new Exception(e.toString()); + throw new Exception(e.getMessage()); } } @@ -148,7 +148,7 @@ public class TcpSocket extends Socket { SocketAddress myaddr = ((SocketDescriptor)getFd()).getLocalAddress(); return myaddr.equals(peeraddr); } catch (IOException e) { - throw new Exception(e.toString()); + throw new Exception(e.getMessage()); } } @@ -157,7 +157,7 @@ public class TcpSocket extends Socket { try { ((SocketDescriptor)getFd()).shutdown(); } catch (IOException e) { - throw new Exception(e.toString()); + throw new Exception(e.getMessage()); } } |