00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __EXCEPTION_H__
00012 #define __EXCEPTION_H__
00013
00014 #include <exception>
00015
00016 BEGIN_FASTDB_NAMESPACE
00017
00018 #ifdef FASTDB_DLL
00019 class __declspec(dllexport) std::exception;
00020 #endif
00021
00022 class FASTDB_DLL_ENTRY dbException : public std::exception
00023 {
00024 protected:
00025 int err_code;
00026 char* msg;
00027 int arg;
00028
00029 public:
00030 dbException(int p_err_code, char const* p_msg = NULL, int p_arg = 0);
00031 dbException(dbException const& ex);
00032
00033 virtual~dbException() throw ();
00034
00035 virtual const char *what() const throw();
00036
00037 int getErrCode() const { return err_code; }
00038 char* getMsg() const { return msg; }
00039 long getArg() const { return arg; }
00040 };
00041
00042 END_FASTDB_NAMESPACE
00043
00044 #endif