/* */ #ifndef _D_EXCEPTION_H_ #define _D_EXCEPTION_H_ #include "common.h" #include #include #include using namespace std; class Exception { private: string msg; protected: void setMsg(const string& msgsrc, va_list ap) { char buf[256]; vsnprintf(buf, sizeof(buf), msgsrc.c_str(), ap); msg = buf; } public: Exception() {} virtual ~Exception() {} string getMsg() { return msg; } }; #endif // _D_EXCEPTION_H_