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/Thrift.h b/lib/cpp/src/Thrift.h
index 92143cc..e497255 100644
--- a/lib/cpp/src/Thrift.h
+++ b/lib/cpp/src/Thrift.h
@@ -14,15 +14,21 @@
 
 namespace facebook { namespace thrift {
 
-class Exception : public std::exception {
+class TException : public std::exception {
 public:
-  Exception(const std::string message) :
+  TException() {}
+
+  TException(const std::string message) :
     message_(message) {}
 
-  ~Exception() throw () {}
+  ~TException() throw() {}
 
   const char* what() {
-    return message_.c_str();
+    if (message_.empty()) {
+      return "Default TException.";
+    } else {
+      return message_.c_str();
+    }
   }
 
 private: