ddc
DDCInternalError.h
Go to the documentation of this file.
1 //-*- Mode: C++ -*-
2 // DDC originally by Alexey Sokirko
3 // Changes and modifications 2011-2015 by Bryan Jurish
4 //
5 // This file is part of DDC.
6 //
7 // DDC is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // DDC is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Lesser General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with DDC. If not, see <http://www.gnu.org/licenses/>.
19 //
20 #ifndef DDC_internal_error_h
21 #define DDC_internal_error_h
22 
23 
25 {
26  errNone = 0,
34  errLogic = 8,
36 };
37 
38 
39 inline const char* GetDDCErrorString(DDCErrorEnum ErrorCode)
40 {
41  switch (ErrorCode) {
42  case errNone: return "No error";
43  case errReadOccurrenceFile: return "cannot read an index file";
44  case errProcessMorphology: return "an exception in morphology";
45  case errNonePath: return "bad path for index files";
46  case errParseError: return "cannot parse the input query";
47  case errReadSourceFile: return "cannot read a source file";
48  case errTimeoutElapsed: return "timeout elapsed";
49  case errRuntime: return "runtime error";
50  case errLogic: return "logic error";
51  case errOther: return "other error";
52  default: break;
53  }
54  return "Unknown error code";
55 }
56 
57 #endif
58 
59 /*--- emacs style variables ---
60  * Local Variables:
61  * mode: C++
62  * c-file-style: "ellemtel"
63  * c-basic-offset: 4
64  * tab-width: 8
65  * indent-tabs-mode: nil
66  * End:
67  */
Definition: DDCInternalError.h:35
Definition: DDCInternalError.h:32
Definition: DDCInternalError.h:30
const char * GetDDCErrorString(DDCErrorEnum ErrorCode)
Definition: DDCInternalError.h:39
Definition: DDCInternalError.h:31
Definition: DDCInternalError.h:33
Definition: DDCInternalError.h:27
Definition: DDCInternalError.h:34
DDCErrorEnum
Definition: DDCInternalError.h:24
Definition: DDCInternalError.h:29
Definition: DDCInternalError.h:26
Definition: DDCInternalError.h:28