00001 #ifndef DEF_INDEXINGEXCEPTION 00002 #define DEF_INDEXINGEXCEPTION 00003 00004 #include <stdexcept> 00005 00006 namespace groupindex 00007 { 00008 00016 class IndexingException : public ::std::exception 00017 { 00018 private: 00019 int error_type; 00020 00021 public: 00022 00023 typedef enum 00024 { 00025 FILE_ERROR_WRITE, 00026 FILE_ERROR_READ, 00027 FILE_ERROR_OPEN, 00028 FILE_ERROR_CLOSE, 00029 OUT_OF_MEMORY, 00030 INTERNAL_ERROR, 00031 INDEX_OUT_OF_BOUNDS, 00032 INDEX_WRONG_MODE, 00033 UNKNOWN_FILEINDEX, 00034 UNKNOWN_FILENAME, 00035 NO_SUCH_FILE, 00036 FILE_ALREADY_EXISTS, 00037 INVALID_QUERY, 00038 UNKNOWN_ERROR, 00039 END_ITERATOR_DEREFERENCED 00040 } ErrorID; 00041 00042 ErrorID error; 00043 00044 00045 IndexingException(); 00046 00047 IndexingException(ErrorID eid); 00048 00049 const char* what() const 00050 throw () ; 00051 00052 }; 00053 00054 00055 } 00056 00057 #endif