My Project
|
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 #pragma once 00029 #include "Define.h" 00030 #include <sqlite3.h> 00031 #include <string> 00032 #include <exception> 00033 #include <algorithm> 00034 #include <iterator> 00035 #include <sstream> 00036 00037 namespace SallyAPI 00038 { 00039 namespace Database 00040 { 00049 00050 class DLL_API_SALLY CSQLException 00051 { 00052 private: 00053 std::string m_strMsg; 00054 int m_nCode; 00055 00056 void setMessageFromCode(); 00057 public: 00058 CSQLException(int code); 00059 CSQLException(const std::string& msg); 00060 ~CSQLException(); 00061 00062 int GetCode(); 00063 std::string GetMessage(); 00064 const char* what() const throw(); 00065 }; 00066 } 00067 }