From 97f9d60be8c50199e641ad8edb676c582dd7b8da Mon Sep 17 00:00:00 2001 From: Martin Kraemer Date: Wed, 6 Dec 2006 19:52:16 +0000 Subject: [PATCH] Thrift TException does not properly define virtual what() method. Summary: Clients would elect to call the base class what() method instead of the derived version. This results in less than usable exceptions for debugging. Reviewed By: Karl * mcslee Test Plan: Tested with local application in development. Revert Plan: revertible. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664887 13f79535-47bb-0310-9956-ffa450edef68 --- lib/cpp/src/Thrift.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h index e497255e..347ec213 100644 --- a/lib/cpp/src/Thrift.h +++ b/lib/cpp/src/Thrift.h @@ -23,7 +23,7 @@ public: ~TException() throw() {} - const char* what() { + const char* what() const throw() { if (message_.empty()) { return "Default TException."; } else { -- 2.17.1