SourceForge.jp

dkutilException.h

説明を見る。
00001 
00002 #ifndef _dkutil_Exception__
00003 #define _dkutil_Exception__
00004 
00005 #include "dkutilDefinedC.h"
00006 
00007 namespace dkutil{
00008 
00009 struct dkutil_exception : public std::runtime_error{
00010     //std::string m_what;
00011 
00012 /*
00013     const char *what()const{return m_what.c_str();}
00014     dkutil_exception(char *str,int state) : m_what(str) ,m_state(state){}
00015 
00016     virtual ~dkutil_exception(){}
00017 */
00018 protected:
00019     int m_state;
00020     enum{
00021         enuERROR_RESULT = edk_FAILED,
00022     };
00023 public:
00024     typedef std::runtime_error BASE_TYPE;
00025     int error_result()const{return enuERROR_RESULT;}
00026     int state()const{return m_state;}
00027     dkutil_exception(char *str,...) : BASE_TYPE(" "){
00028         char s[2048]="";
00029         SET_VA_LIST(s,sizeof(s),str);
00030         std::runtime_error err(s);
00031         m_state = 0;
00032         BASE_TYPE::operator=(err);
00033 
00034     }
00035     dkutil_exception(int state,char *str,...): BASE_TYPE(" "){
00036         char s[2048]="";
00037         SET_VA_LIST(s,sizeof(s),str);
00038         std::runtime_error err(s);
00039         m_state = state;
00040         BASE_TYPE::operator=(err);
00041 
00042     }
00043     dkutil_exception(int state) : m_state(state), BASE_TYPE(" ") {}
00044 
00045 };
00046 
00047 }//end of dkutil namespace
00048 
00049 #endif //end of include once

dkutil 1.02リリース前 d金魚専用マニュアルバージョンに対してSun Dec 28 21:23:07 2003に生成されました。 doxygen 1.3.5