Thrift: C++ peek() method and TException not Exception
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664876 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/server/TNonblockingServer.cpp b/lib/cpp/src/server/TNonblockingServer.cpp
index 75a209e..a7c8393 100644
--- a/lib/cpp/src/server/TNonblockingServer.cpp
+++ b/lib/cpp/src/server/TNonblockingServer.cpp
@@ -154,10 +154,14 @@
try {
// Invoke the processor
server_->getProcessor()->process(inputProtocol_, outputProtocol_);
- } catch (TTransportException &x) {
- fprintf(stderr, "Server::process %s\n", x.getMessage().c_str());
+ } catch (TTransportException &ttx) {
+ fprintf(stderr, "Server::process() %s\n", ttx.what());
close();
- return;
+ return;
+ } catch (TException &x) {
+ fprintf(stderr, "Server::process() %s\n", x.what());
+ close();
+ return;
} catch (...) {
fprintf(stderr, "Server::process() unknown exception\n");
close();