From: Martin Kraemer Date: Mon, 5 Feb 2007 20:58:41 +0000 (+0000) Subject: Thrift: Exception message is protected and accessible to derived classes. X-Git-Tag: 0.2.0~1501 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=92a2eac8cbeef3fbdb6f3f9dd9df8db226240959;p=common%2Fthrift.git Thrift: Exception message is protected and accessible to derived classes. Summary: Exception message is protected and accessible to derived classes. Reviewed By: Karl Revert Plan: revertible Notes: git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664971 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h index 6174d466..2268c347 100644 --- a/lib/cpp/src/Thrift.h +++ b/lib/cpp/src/Thrift.h @@ -23,7 +23,7 @@ public: virtual ~TException() throw() {} - const char* what() const throw() { + virtual const char* what() const throw() { if (message_.empty()) { return "Default TException."; } else { @@ -31,7 +31,7 @@ public: } } -private: +protected: std::string message_; };