aboutsummaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/network/TcpSocket.java
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2012-12-16 20:35:39 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2012-12-16 20:35:39 +0000
commit504d98fcaa0c9571e3fb011947fa1a1e1d263237 (patch)
treec1297c2f593f6871e2f9e9e77c12994b98e9ac0d /java/com/tigervnc/network/TcpSocket.java
parentd93a26d665b18b0e779c524f54c7acdc18898b94 (diff)
downloadtigervnc-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.java6
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());
}
}