00001 #ifndef DDC_internal_error_h 00002 #define DDC_internal_error_h 00003 00004 00005 enum DDCErrorEnum 00006 { errUnknown = 0, 00007 errReadOccurrenceFile = 1, 00008 errProcessMorphology = 2, 00009 errUnknownPath = 3, 00010 errParseError = 4, 00011 errReadSourceFile = 5, 00012 errTimeoutElapsed = 6 00013 }; 00014 00015 00016 inline string GetDDCErrorString(DDCErrorEnum ErrorCode) 00017 { 00018 switch (ErrorCode) { 00019 case errUnknown: return "No error"; 00020 case errReadOccurrenceFile: return "cannot read an index file"; 00021 case errProcessMorphology: return "an exception in morphology"; 00022 case errUnknownPath: return "bad path for index files"; 00023 case errParseError: return "cannot parse the input query"; 00024 case errReadSourceFile: return "cannot read a source file"; 00025 case errTimeoutElapsed: return "timeout elapsed"; 00026 }; 00027 return "Unknown error code"; 00028 00029 }; 00030 00031 #endif