29 #include <ignite/common/common.h>
31 #define IGNITE_ERROR_1(code, part1) { \
32 std::stringstream stream; \
34 throw ignite::IgniteError(code, stream.str().c_str()); \
37 #define IGNITE_ERROR_2(code, part1, part2) { \
38 std::stringstream stream; \
39 stream << (part1) << (part2); \
40 throw ignite::IgniteError(code, stream.str().c_str()); \
43 #define IGNITE_ERROR_3(code, part1, part2, part3) { \
44 std::stringstream stream; \
45 stream << (part1) << (part2) << (part3); \
46 throw ignite::IgniteError(code, stream.str().c_str()); \
49 #define IGNITE_ERROR_FORMATTED_1(code, msg, key1, val1) { \
50 std::stringstream stream; \
51 stream << msg << " [" << key1 << "=" << (val1) << "]"; \
52 throw ignite::IgniteError(code, stream.str().c_str()); \
55 #define IGNITE_ERROR_FORMATTED_2(code, msg, key1, val1, key2, val2) { \
56 std::stringstream stream; \
57 stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << "]"; \
58 throw ignite::IgniteError(code, stream.str().c_str()); \
61 #define IGNITE_ERROR_FORMATTED_3(code, msg, key1, val1, key2, val2, key3, val3) { \
62 std::stringstream stream; \
63 stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << "]"; \
64 throw ignite::IgniteError(code, stream.str().c_str()); \
67 #define IGNITE_ERROR_FORMATTED_4(code, msg, key1, val1, key2, val2, key3, val3, key4, val4) { \
68 std::stringstream stream; \
69 stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << ", " << key4 << "=" << (val4) << "]"; \
70 throw ignite::IgniteError(code, stream.str().c_str()); \
82 static const int IGNITE_SUCCESS = 0;
85 static const int IGNITE_ERR_JVM_INIT = 1;
88 static const int IGNITE_ERR_JVM_ATTACH = 2;
91 static const int IGNITE_ERR_JVM_LIB_NOT_FOUND = 3;
94 static const int IGNITE_ERR_JVM_LIB_LOAD_FAILED = 4;
97 static const int IGNITE_ERR_JVM_NO_CLASSPATH = 5;
100 static const int IGNITE_ERR_JVM_NO_CLASS_DEF_FOUND = 6;
103 static const int IGNITE_ERR_JVM_NO_SUCH_METHOD = 7;
106 static const int IGNITE_ERR_MEMORY = 1001;
109 static const int IGNITE_ERR_BINARY = 1002;
112 static const int IGNITE_ERR_GENERIC = 2000;
115 static const int IGNITE_ERR_ILLEGAL_ARGUMENT = 2001;
118 static const int IGNITE_ERR_ILLEGAL_STATE = 2002;
121 static const int IGNITE_ERR_UNSUPPORTED_OPERATION = 2003;
124 static const int IGNITE_ERR_INTERRUPTED = 2004;
127 static const int IGNITE_ERR_CLUSTER_GROUP_EMPTY = 2005;
130 static const int IGNITE_ERR_CLUSTER_TOPOLOGY = 2006;
133 static const int IGNITE_ERR_COMPUTE_EXECUTION_REJECTED = 2007;
136 static const int IGNITE_ERR_COMPUTE_JOB_FAILOVER = 2008;
139 static const int IGNITE_ERR_COMPUTE_TASK_CANCELLED = 2009;
142 static const int IGNITE_ERR_COMPUTE_TASK_TIMEOUT = 2010;
145 static const int IGNITE_ERR_COMPUTE_USER_UNDECLARED_EXCEPTION = 2011;
148 static const int IGNITE_ERR_CACHE = 2012;
151 static const int IGNITE_ERR_CACHE_LOADER = 2013;
154 static const int IGNITE_ERR_CACHE_WRITER = 2014;
157 static const int IGNITE_ERR_ENTRY_PROCESSOR = 2015;
160 static const int IGNITE_ERR_CACHE_ATOMIC_UPDATE_TIMEOUT = 2016;
163 static const int IGNITE_ERR_CACHE_PARTIAL_UPDATE = 2017;
166 static const int IGNITE_ERR_TX_OPTIMISTIC = 2018;
169 static const int IGNITE_ERR_TX_TIMEOUT = 2019;
172 static const int IGNITE_ERR_TX_ROLLBACK = 2020;
175 static const int IGNITE_ERR_TX_HEURISTIC = 2021;
178 static const int IGNITE_ERR_AUTHENTICATION = 2022;
181 static const int IGNITE_ERR_SECURITY = 2023;
184 static const int IGNITE_ERR_UNKNOWN = -1;
238 int32_t GetCode()
const;
245 const char* GetText()
const;
255 static void SetError(
const int jniCode,
const char* jniCls,
const char* jniMsg,
IgniteError* err);
Ignite error information.
Definition: ignite_error.h:78
Apache Ignite API.
Definition: binary_consts.h:28