Apache Ignite C++ Client
Loading...
Searching...
No Matches
error_codes.h
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18// THIS IS AUTO-GENERATED FILE. DO NOT EDIT.
19
20#pragma once
21
22#include <cstdint>
23
24namespace ignite {
25
26namespace error {
27
28using underlying_t = std::uint32_t;
29
30static inline const std::uint32_t group_shift = 16;
31
32// Error groups codes.
33enum class group : underlying_t {
34 CMN = 0x1,
35 TBL = 0x2,
36 CLIENT = 0x3,
37 SQL = 0x4,
38 META = 0x5,
39 IDX = 0x6,
40 TX = 0x7,
41 REP = 0x8,
42 STORAGE = 0x9,
43 DISTRZONES = 0xa,
44 NETWORK = 0xb,
45 NODECFG = 0xc,
46 CODEDEPLOY = 0xd,
47 GC = 0xe,
48 AUTHENTICATION = 0xf,
49 COMPUTE = 0x10,
50 CATALOG = 0x11,
51 PLACEMENTDRIVER = 0x12,
52 WORKERS = 0x13,
53 RECOVERY = 0x14,
54 EMBEDDED = 0x15,
55 MARSHALLING = 0x16,
56 REST = 0x17,
57 COMMONCFG = 0x18
58};
59
60inline group get_group_by_error_code(const underlying_t code) {
61 return group(code >> group_shift);
62}
63
64// Error codes.
65enum class code : underlying_t {
66 // Common group. Group code: 1
67 NODE_STOPPING = 0x10001,
68 COMPONENT_NOT_STARTED = 0x10002,
69 ILLEGAL_ARGUMENT = 0x10003,
70 SSL_CONFIGURATION = 0x10004,
71 NODE_LEFT = 0x10005,
72 CURSOR_ALREADY_CLOSED = 0x10006,
73 RESOURCE_CLOSING = 0x10007,
74 USER_OBJECT_SERIALIZATION = 0x10008,
75 NULLABLE_VALUE = 0x10009,
76 INTERNAL = 0x1ffff,
77
78 // Table group. Group code: 2
79 TABLE_ALREADY_EXISTS = 0x20001,
80 TABLE_NOT_FOUND = 0x20002,
81 COLUMN_ALREADY_EXISTS = 0x20003,
82 COLUMN_NOT_FOUND = 0x20004,
83 SCHEMA_VERSION_MISMATCH = 0x20005,
84 UNSUPPORTED_PARTITION_TYPE = 0x20006,
85
86 // Client group. Group code: 3
87 CONNECTION = 0x30001,
88 PROTOCOL = 0x30002,
89 PROTOCOL_COMPATIBILITY = 0x30003,
90 TABLE_ID_NOT_FOUND = 0x30004,
91 CONFIGURATION = 0x30005,
92 CLUSTER_ID_MISMATCH = 0x30006,
93 CLIENT_SSL_CONFIGURATION = 0x30007,
94 HANDSHAKE_HEADER = 0x30008,
95 SERVER_TO_CLIENT_REQUEST = 0x30009,
96
97 // Sql group. Group code: 4
98 QUERY_NO_RESULT_SET = 0x40001,
99 SCHEMA_NOT_FOUND = 0x40002,
100 STMT_PARSE = 0x40003,
101 STMT_VALIDATION = 0x40004,
102 CONSTRAINT_VIOLATION = 0x40005,
103 EXECUTION_CANCELLED = 0x40006,
104 RUNTIME = 0x40007,
105 MAPPING = 0x40008,
106 TX_CONTROL_INSIDE_EXTERNAL_TX = 0x40009,
107
108 // MetaStorage group. Group code: 5
109 STARTING_STORAGE = 0x50001,
110 RESTORING_STORAGE = 0x50002,
111 COMPACTION = 0x50003,
112 OP_EXECUTION = 0x50004,
113 OP_EXECUTION_TIMEOUT = 0x50005,
114 COMPACTED = 0x50006,
115 DIVERGED = 0x50007,
116
117 // Index group. Group code: 6
118 INDEX_NOT_FOUND = 0x60001,
119 INDEX_ALREADY_EXISTS = 0x60002,
120
121 // Transactions group. Group code: 7
122 TX_STATE_STORAGE = 0x70001,
123 TX_STATE_STORAGE_STOPPED = 0x70002,
124 TX_UNEXPECTED_STATE = 0x70003,
125 ACQUIRE_LOCK = 0x70004,
126 ACQUIRE_LOCK_TIMEOUT = 0x70005,
127 TX_COMMIT = 0x70006,
128 TX_ROLLBACK = 0x70007,
129 TX_FAILED_READ_WRITE_OPERATION = 0x70008,
130 TX_STATE_STORAGE_REBALANCE = 0x70009,
131 TX_READ_ONLY_TOO_OLD = 0x7000a,
132 TX_INCOMPATIBLE_SCHEMA = 0x7000b,
133 TX_PRIMARY_REPLICA_EXPIRED = 0x7000c,
134 TX_ALREADY_FINISHED = 0x7000d,
135 TX_STALE_OPERATION = 0x7000e,
136 TX_STALE_READ_ONLY_OPERATION = 0x7000f,
137 TX_ALREADY_FINISHED_WITH_TIMEOUT = 0x70010,
138
139 // Replicator group. Group code: 8
140 REPLICA_COMMON = 0x80001,
141 REPLICA_IS_ALREADY_STARTED = 0x80002,
142 REPLICA_TIMEOUT = 0x80003,
143 REPLICA_UNSUPPORTED_REQUEST = 0x80004,
144 REPLICA_UNAVAILABLE = 0x80005,
145 REPLICA_MISS = 0x80006,
146 CURSOR_CLOSE = 0x80007,
147 REPLICA_STOPPING = 0x80008,
148 GROUP_OVERLOADED = 0x80009,
149
150 // Storage group. Group code: 9
151 INDEX_NOT_BUILT = 0x90001,
152 STORAGE_CORRUPTED = 0x90002,
153
154 // DistributionZones group. Group code: 10
155 ZONE_NOT_FOUND = 0xa0001,
156 EMPTY_DATA_NODES = 0xa0002,
157
158 // Network group. Group code: 11
159 UNRESOLVABLE_CONSISTENT_ID = 0xb0001,
160 BIND = 0xb0002,
161 FILE_TRANSFER = 0xb0003,
162 FILE_VALIDATION = 0xb0004,
163 RECIPIENT_LEFT = 0xb0005,
164 ADDRESS_UNRESOLVED = 0xb0006,
165 PORT_IN_USE [[deprecated("PORT_IN_USE is deprecated. Use BIND instead.")]] = BIND,
166
167 // NodeConfiguration group. Group code: 12
168 CONFIG_READ = 0xc0001,
169 CONFIG_FILE_CREATE = 0xc0002,
170 CONFIG_WRITE = 0xc0003,
171 CONFIG_PARSE = 0xc0004,
172
173 // CodeDeployment group. Group code: 13
174 UNIT_NOT_FOUND = 0xd0001,
175 UNIT_ALREADY_EXISTS = 0xd0002,
176 UNIT_CONTENT_READ = 0xd0003,
177 UNIT_UNAVAILABLE = 0xd0004,
178 UNIT_ZIP = 0xd0005,
179 UNIT_WRITE = 0xd0006,
180
181 // GarbageCollector group. Group code: 14
182 CLOSED = 0xe0001,
183
184 // Authentication group. Group code: 15
185 UNSUPPORTED_AUTHENTICATION_TYPE = 0xf0001,
186 INVALID_CREDENTIALS = 0xf0002,
187 BASIC_PROVIDER = 0xf0003,
188
189 // Compute group. Group code: 16
190 CLASS_PATH = 0x100001,
191 CLASS_LOADER = 0x100002,
192 CLASS_INITIALIZATION = 0x100003,
193 QUEUE_OVERFLOW = 0x100004,
194 COMPUTE_JOB_STATUS_TRANSITION = 0x100005,
195 CANCELLING = 0x100006,
196 RESULT_NOT_FOUND = 0x100007,
197 FAIL_TO_GET_JOB_STATE = 0x100008,
198 COMPUTE_JOB_FAILED = 0x100009,
199 PRIMARY_REPLICA_RESOLVE = 0x10000a,
200 CHANGE_JOB_PRIORITY = 0x10000b,
201 NODE_NOT_FOUND = 0x10000c,
202 MARSHALLING_TYPE_MISMATCH = 0x10000d,
203 COMPUTE_JOB_CANCELLED = 0x10000e,
204 COMPUTE_PLATFORM_EXECUTOR = 0x10000f,
205
206 // Catalog group. Group code: 17
207 VALIDATION = 0x110001,
208
209 // PlacementDriver group. Group code: 18
210 PRIMARY_REPLICA_AWAIT_TIMEOUT = 0x120001,
211 PRIMARY_REPLICA_AWAIT = 0x120002,
212 EMPTY_ASSIGNMENTS = 0x120003,
213
214 // CriticalWorkers group. Group code: 19
215 SYSTEM_WORKER_BLOCKED = 0x130001,
216 SYSTEM_CRITICAL_OPERATION_TIMEOUT = 0x130002,
217
218 // DisasterRecovery group. Group code: 20
219 ILLEGAL_PARTITION_ID = 0x140001,
220 NODES_NOT_FOUND = 0x140002,
221 PARTITION_STATE = 0x140003,
222 CLUSTER_NOT_IDLE = 0x140004,
223 NOT_ENOUGH_ALIVE_NODES = 0x140005,
224 ILLEGAL_NODES_SET = 0x140006,
225
226 // Embedded group. Group code: 21
227 CLUSTER_NOT_INITIALIZED = 0x150001,
228 CLUSTER_INIT_FAILED = 0x150002,
229 NODE_NOT_STARTED = 0x150003,
230 NODE_START = 0x150004,
231
232 // Marshalling group. Group code: 22
233 COMMON = 0x160001,
234 UNSUPPORTED_OBJECT_TYPE = 0x160002,
235 UNMARSHALLING = 0x160003,
236
237 // Rest group. Group code: 23
238 CLUSTER_NOT_INIT = 0x170001,
239
240 // CommonConfiguration group. Group code: 24
241 CONFIGURATION_APPLY = 0x180001,
242 CONFIGURATION_PARSE = 0x180002,
243 CONFIGURATION_VALIDATION = 0x180003
244};
245
246} // namespace error
247
248} // namespace ignite