Thrift: Exception message is protected and accessible to derived classes.
authorMartin Kraemer <martin@apache.org>
Mon, 5 Feb 2007 20:58:41 +0000 (20:58 +0000)
committerMartin Kraemer <martin@apache.org>
Mon, 5 Feb 2007 20:58:41 +0000 (20:58 +0000)
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

lib/cpp/src/Thrift.h

index 6174d46..2268c34 100644 (file)
@@ -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_;
 
 };