Mark Slee | f5f2be4 | 2006-09-05 21:05:31 +0000 | [diff] [blame] | 1 | #ifndef _THRIFT_THRIFT_H_ |
2 | #define _THRIFT_THRIFT_H_ 1 | ||||
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 3 | |
Mark Slee | 8d7e1f6 | 2006-06-07 06:48:56 +0000 | [diff] [blame] | 4 | #include <netinet/in.h> |
5 | #include <inttypes.h> | ||||
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 6 | #include <string> |
7 | #include <map> | ||||
8 | #include <list> | ||||
9 | #include <set> | ||||
Mark Slee | 4ecbebc | 2006-09-05 00:14:21 +0000 | [diff] [blame] | 10 | #include <vector> |
Marc Slemko | 5b126d6 | 2006-08-11 23:03:42 +0000 | [diff] [blame] | 11 | #include <exception> |
12 | |||||
Aditya Agarwal | d622e96 | 2006-10-11 02:42:49 +0000 | [diff] [blame^] | 13 | #include "TLogging.h" |
14 | |||||
Mark Slee | cfc0193 | 2006-09-01 22:18:16 +0000 | [diff] [blame] | 15 | namespace facebook { namespace thrift { |
Marc Slemko | 5b126d6 | 2006-08-11 23:03:42 +0000 | [diff] [blame] | 16 | |
17 | class Exception : public std::exception { | ||||
Marc Slemko | 5b126d6 | 2006-08-11 23:03:42 +0000 | [diff] [blame] | 18 | public: |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 19 | Exception(const std::string message) : |
20 | message_(message) {} | ||||
21 | |||||
Marc Slemko | 5b126d6 | 2006-08-11 23:03:42 +0000 | [diff] [blame] | 22 | ~Exception() throw () {} |
Mark Slee | 2f6404d | 2006-10-10 01:37:40 +0000 | [diff] [blame] | 23 | |
24 | const char* what() { | ||||
25 | return message_.c_str(); | ||||
26 | } | ||||
27 | |||||
28 | private: | ||||
29 | const std::string message_; | ||||
30 | |||||
Marc Slemko | 5b126d6 | 2006-08-11 23:03:42 +0000 | [diff] [blame] | 31 | }; |
32 | |||||
33 | }} // facebook::thrift | ||||
Mark Slee | e854063 | 2006-05-30 09:24:40 +0000 | [diff] [blame] | 34 | |
Mark Slee | f5f2be4 | 2006-09-05 21:05:31 +0000 | [diff] [blame] | 35 | #endif // #ifndef _THRIFT_THRIFT_H_ |