Fix messed up exception error printing
authorMark Slee <mcslee@apache.org>
Fri, 11 May 2007 17:58:54 +0000 (17:58 +0000)
committerMark Slee <mcslee@apache.org>
Fri, 11 May 2007 17:58:54 +0000 (17:58 +0000)
Reviewed By: boz

Test Plan: comes up in feed

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665107 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/transport/TSocket.cpp

index 95781f0..32fc2e7 100644 (file)
@@ -274,7 +274,9 @@ uint32_t TSocket::read(uint8_t* buf, uint32_t len) {
     }
     
     // Some other error, whatevz
-    throw TTransportException(TTransportException::UNKNOWN, "ERROR:" + errno);
+    char buff[1024];
+    sprintf(buff, "ERROR errno: %d", errno);
+    throw TTransportException(TTransportException::UNKNOWN, buff);
   }
   
   // The remote host has closed the socket