00001 #ifndef SDXEXCEPTION_H
00002 #define SDXEXCEPTION_H
00003
00004 #include <exception>
00005 #include <string>
00006
00007 namespace SDX {
00011 class Exception {
00012 public:
00016 enum Code {
00017 ParseError,
00018 ContentHandlerError,
00019 WriteError
00020 };
00021 public:
00025 Exception(int code, const char* description) : m_code(code), m_description(description){}
00026
00030 int code(){ return m_code; }
00031
00035 const char* what() const { return m_description; }
00036 private:
00037 int m_code;
00038 const char* m_description;
00039 };
00040 }
00041
00042 #endif