Various Thrift fixes, including Application Exception support in Ruby, better errror messages across languages, etc.
Reviewed By: thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665058 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/py/src/transport/TSocket.py b/lib/py/src/transport/TSocket.py
index 1f9c480..280d6aa 100644
--- a/lib/py/src/transport/TSocket.py
+++ b/lib/py/src/transport/TSocket.py
@@ -13,7 +13,6 @@
"""Socket implementation of TTransport base."""
-
def __init__(self, host='localhost', port=9090):
self.host = host
self.port = port
@@ -34,7 +33,7 @@
self.handle = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.handle.connect((self.host, self.port))
except socket.error, e:
- raise TTransportException(TTransportException.NOT_OPEN)
+ raise TTransportException(TTransportException.NOT_OPEN, 'Could not connect to %s:%d' % (self.host, self.port))
def close(self):
if self.handle != None: