Groundwork for exception support:
Auto generate result structs that combine return type and any thrown exceptions
Add __isset struct to all user defined and auto defined struct to mark fields that are explicilty read
Modified client and server generation code to marshal result structs
Added base facebook::thrift::Exception class
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664750 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/Thrift.h b/lib/cpp/src/Thrift.h
index 9986e3b..1f98d82 100644
--- a/lib/cpp/src/Thrift.h
+++ b/lib/cpp/src/Thrift.h
@@ -7,5 +7,20 @@
#include <map>
#include <list>
#include <set>
+#include <exception>
+
+namespace facebook {namespace thrift {
+
+class Exception : public std::exception {
+private:
+ const std::string _message;
+
+public:
+ Exception(const std::string message) : _message(message) {}
+ ~Exception() throw () {}
+ const char* what() {return _message.c_str();}
+};
+
+}} // facebook::thrift
#endif