CigiException.h

Go to the documentation of this file.
00001 
00046 class CigiException;
00047 
00048 
00049 #if ! defined( _CIGI_EXCEPTION_INCLUDED_)
00050 #define _CIGI_EXCEPTION_INCLUDED_
00051 
00052 
00053 // -------- include files -----------------------------------------
00054 
00055 #include <string.h>
00056 
00057 #include "CigiErrorCodes.h"
00058 
00059 #include <exception>
00060 
00061 #include "CigiTypes.h"
00062 
00063 // -------- preprocessor definitions ------------------------------
00064 
00065 
00066 
00067 
00068 
00069 // -------- class definition --------------------------------------
00070 
00071 //=========================================================
00074 class CIGI_SPEC CigiException : public std::exception
00075 {
00076 
00077 public:
00078 
00079 
00080    //==> Management
00081 
00082    //=========================================================
00085    CigiException( void) { };
00086 
00087 
00088    //=========================================================
00091    virtual ~CigiException( void) throw() { };
00092 
00093 
00094 
00095    //==> Accessing Member Variable Values functions
00096 
00097 
00098    //=========================================================
00102    bool HasMessage( void) const
00103    {
00104       return(Msg != NULL);
00105    }
00106 
00107    //=========================================================
00111    int GetErrorCode( void) const { return(ErrorCode); }
00112 
00113    //=========================================================
00117    bool HasErrorCode( void) const
00118    {
00119       return(ErrorCode != CIGI_ERROR_NONE); // same as CIGI_SUCCESS
00120    }
00121 
00122 
00123    //=========================================================
00127    virtual const char *what() const throw() { return(Msg); }
00128 
00129 
00130 protected:
00131 
00132    //=========================================================
00135    char *Msg;
00136 
00137    //=========================================================
00140    int ErrorCode;
00141 
00142 
00143 };
00144 
00145 
00146 
00147 
00148 
00149     
00150 #endif  // _CIGI_EXCEPTION_INCLUDED_
00151 
00152 
00153 
00154 
00155 
00156 
00157 
00158 
00159 
00160 
00161 
00162 
00163 
00164 
00165 
00166 
00167 
00168 
00169 
00170 
00171 
00172 
00173 
00174 
00175 
00176 
00177 
00178 
00179 
00180 
00181 
00182 
00183 
00184 
00185 
00186 
00187 
00188 
00189 
00190 
00191 
00192 
00193 
00194 
00195 
00196 
00197 
00198 
00199 
00200 
00201 
00202 
00203 
00204 
00205 
00206 
00207 
00208 
00209 
00210 
00211 
00212 
00213 
00214 

Generated on Wed Apr 29 08:59:56 2009 for CCL by  doxygen 1.4.7