Fix TSimpleServer exception bug
authorMark Slee <mcslee@apache.org>
Wed, 6 Dec 2006 00:13:42 +0000 (00:13 +0000)
committerMark Slee <mcslee@apache.org>
Wed, 6 Dec 2006 00:13:42 +0000 (00:13 +0000)
Reviewed By: tbr-martin

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

lib/cpp/src/server/TSimpleServer.cpp

index b453ce6..8d62bf9 100644 (file)
@@ -40,6 +40,8 @@ void TSimpleServer::serve() {
         }
       } catch (TTransportException& ttx) {
         cerr << "TSimpleServer client died: " << ttx.what() << endl;
+      } catch (TException& tx) {
+        cerr << "TSimpleServer exception: " << tx.what() << endl;
       }
       iot.first->close();
       iot.second->close();
@@ -47,6 +49,8 @@ void TSimpleServer::serve() {
     }
   } catch (TTransportException& ttx) {
     cerr << "TServerTransport died on accept: " << ttx.what() << endl;
+  } catch (TException& tx) {
+    cerr << "Some kind of accept exception: " << tx.what() << endl;
   }
 
   // TODO(mcslee): Could this be a timeout case? Or always the real thing?