You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2014/03/28 21:46:01 UTC
git commit: THRIFT-2430 Crash during TThreadPoolServer shutdown
Repository: thrift
Updated Branches:
refs/heads/master d60f9789d -> ea6076f17
THRIFT-2430 Crash during TThreadPoolServer shutdown
Patch: Lars Benner
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/ea6076f1
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/ea6076f1
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/ea6076f1
Branch: refs/heads/master
Commit: ea6076f1750fecf2f2bd0a9fa4747f916588427b
Parents: d60f978
Author: Jens Geyer <je...@apache.org>
Authored: Fri Mar 28 22:45:27 2014 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Fri Mar 28 22:45:27 2014 +0200
----------------------------------------------------------------------
.../src/thrift/transport/TTransportException.cpp | 19 +++++++++++++++++++
.../src/thrift/transport/TTransportException.h | 18 +-----------------
2 files changed, 20 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/ea6076f1/lib/cpp/src/thrift/transport/TTransportException.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/transport/TTransportException.cpp b/lib/cpp/src/thrift/transport/TTransportException.cpp
index 2c1f303..2b1430c 100644
--- a/lib/cpp/src/thrift/transport/TTransportException.cpp
+++ b/lib/cpp/src/thrift/transport/TTransportException.cpp
@@ -28,4 +28,23 @@ using boost::lexical_cast;
namespace apache { namespace thrift { namespace transport {
+ const char* TTransportException::what() const throw() {
+ if (message_.empty()) {
+ switch (type_) {
+ case UNKNOWN : return "TTransportException: Unknown transport exception";
+ case NOT_OPEN : return "TTransportException: Transport not open";
+ case TIMED_OUT : return "TTransportException: Timed out";
+ case END_OF_FILE : return "TTransportException: End of file";
+ case INTERRUPTED : return "TTransportException: Interrupted";
+ case BAD_ARGS : return "TTransportException: Invalid arguments";
+ case CORRUPTED_DATA : return "TTransportException: Corrupted Data";
+ case INTERNAL_ERROR : return "TTransportException: Internal error";
+ default : return "TTransportException: (Invalid exception type)";
+ }
+ } else {
+ return message_.c_str();
+ }
+ }
+
+
}}} // apache::thrift::transport
http://git-wip-us.apache.org/repos/asf/thrift/blob/ea6076f1/lib/cpp/src/thrift/transport/TTransportException.h
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/transport/TTransportException.h b/lib/cpp/src/thrift/transport/TTransportException.h
index 028dbb8..8558837 100644
--- a/lib/cpp/src/thrift/transport/TTransportException.h
+++ b/lib/cpp/src/thrift/transport/TTransportException.h
@@ -83,23 +83,7 @@ class TTransportException : public apache::thrift::TException {
return type_;
}
- virtual const char* what() const throw() {
- if (message_.empty()) {
- switch (type_) {
- case UNKNOWN : return "TTransportException: Unknown transport exception";
- case NOT_OPEN : return "TTransportException: Transport not open";
- case TIMED_OUT : return "TTransportException: Timed out";
- case END_OF_FILE : return "TTransportException: End of file";
- case INTERRUPTED : return "TTransportException: Interrupted";
- case BAD_ARGS : return "TTransportException: Invalid arguments";
- case CORRUPTED_DATA : return "TTransportException: Corrupted Data";
- case INTERNAL_ERROR : return "TTransportException: Internal error";
- default : return "TTransportException: (Invalid exception type)";
- }
- } else {
- return message_.c_str();
- }
- }
+ virtual const char* what() const throw();
protected:
/** Just like strerror_r but returns a C++ string object. */