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_GIGABASE_NAMESPACE
00017
00018 #ifdef GIGABASE_DLL
00019 class __declspec(dllexport) std::exception;
00020 #endif
00021
00025 class GIGABASE_DLL_ENTRY dbException : public std::exception
00026 {
00027 protected:
00028 int err_code;
00029 char* msg;
00030 int arg;
00031
00032 public:
00039 dbException(int p_err_code, const char* p_msg = NULL, int p_arg = 0);
00040
00044 dbException(dbException const& ex);
00045
00049 virtual ~dbException() throw ();
00050
00051 virtual const char *what() const throw();
00052
00057 int getErrCode() const { return err_code; }
00058
00062 char* getMsg() const { return msg; }
00063
00067 long getArg() const { return arg; }
00068 };
00069
00070 END_GIGABASE_NAMESPACE
00071
00072 #endif