libscid 0.1.0
Chess applications made easy.
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1
5#pragma once
6
7namespace scid::core {
8
9typedef unsigned short errorT;
10
11const errorT
12 OK = 0,
13
14 // General Error:
15 ERROR = 1,
16 ERROR_UserCancel = 2,
17 ERROR_BadArg = 3,
18
19 // File I/O
20 ERROR_FileOpen = 101,
21 ERROR_FileWrite = 102,
22 ERROR_FileRead = 103,
23 ERROR_FileSeek = 104,
24 ERROR_BadMagic = 105,
25 ERROR_FileNotOpen = 106,
26 ERROR_FileInUse = 107,
27 ERROR_FileMode = 108,
28 ERROR_FileVersion = 109,
29 ERROR_OldScidVersion = 110,
30 ERROR_FileReadOnly = 111,
31 ERROR_CompactRemove = 121,
32
33 // Memory Allocation, corrupt data
34 ERROR_MallocFailed = 151,
35 ERROR_CorruptData = 152, ERROR_Corrupt = 152,
36
37 // Database errors
38 ERROR_Full = 201,
39 ERROR_NameNotFound = 202, ERROR_NotFound = 202,
40 ERROR_NameExists = 203, ERROR_Exists = 203,
41 ERROR_NameBaseEmpty = 204, ERROR_Empty = 204,
42 ERROR_NoMatchFound = 205,
43 ERROR_NameDataLoss = 206,
44 ERROR_NameTooLong = 207,
45 ERROR_NameLimit = 208,
46 ERROR_OffsetLimit = 209,
47 ERROR_GameLengthLimit= 210,
48 ERROR_NumGamesLimit = 211,
49
50 // Position errors
51 ERROR_InvalidFEN = 301,
52 ERROR_InvalidMove = 302,
53 ERROR_PieceCount = 303,
54
55 // Game Errors
56 ERROR_Game = 400,
57 ERROR_EndOfMoveList = 401,
58 ERROR_StartOfMoveList = 402,
59 ERROR_NoVariation = 403,
60 ERROR_EmptyVariation = 404,
61 ERROR_VariationLimit = 405,
62 ERROR_Decode = 406,
63 ERROR_GameFull = 407,
64
65 // Buffer errors
66 ERROR_BufferFull = 601,
67 ERROR_BufferRead = 602,
68
69 // Codec errors
70 ERROR_CodecUnsupFeat = 701,
71 ERROR_CodecChess960 = 702;
72
73
74static_assert(OK == false);
75
76
77} // namespace scid::core