15 #ifndef _GRIDGAIN_GRID_ERROR 16 #define _GRIDGAIN_GRID_ERROR 21 #include <ignite/common/common.h> 23 #define GG_ERROR_1(code, part1) { \ 24 std::stringstream stream; \ 26 throw gridgain::GridError(code, stream.str().c_str()); \ 29 #define GG_ERROR_2(code, part1, part2) { \ 30 std::stringstream stream; \ 31 stream << (part1) << (part2); \ 32 throw gridgain::GridError(code, stream.str().c_str()); \ 35 #define GG_ERROR_3(code, part1, part2, part3) { \ 36 std::stringstream stream; \ 37 stream << (part1) << (part2) << (part3); \ 38 throw gridgain::GridError(code, stream.str().c_str()); \ 41 #define GG_ERROR_FORMATTED_1(code, msg, key1, val1) { \ 42 std::stringstream stream; \ 43 stream << msg << " [" << key1 << "=" << (val1) << "]"; \ 44 throw gridgain::GridError(code, stream.str().c_str()); \ 47 #define GG_ERROR_FORMATTED_2(code, msg, key1, val1, key2, val2) { \ 48 std::stringstream stream; \ 49 stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << "]"; \ 50 throw gridgain::GridError(code, stream.str().c_str()); \ 53 #define GG_ERROR_FORMATTED_3(code, msg, key1, val1, key2, val2, key3, val3) { \ 54 std::stringstream stream; \ 55 stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << "]"; \ 56 throw gridgain::GridError(code, stream.str().c_str()); \ 59 #define GG_ERROR_FORMATTED_4(code, msg, key1, val1, key2, val2, key3, val3, key4, val4) { \ 60 std::stringstream stream; \ 61 stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << ", " << key4 << "=" << (val4) << "]"; \ 62 throw gridgain::GridError(code, stream.str().c_str()); \ 74 static const int GG_SUCCESS = 0;
77 static const int GG_ERR_JVM_INIT = 1;
80 static const int GG_ERR_JVM_ATTACH = 2;
83 static const int GG_ERR_JVM_LIB_NOT_FOUND = 3;
86 static const int GG_ERR_JVM_LIB_LOAD_FAILED = 4;
89 static const int GG_ERR_JVM_NO_CLASSPATH = 5;
92 static const int GG_ERR_JVM_NO_CLASS_DEF_FOUND = 6;
95 static const int GG_ERR_JVM_NO_SUCH_METHOD = 7;
98 static const int GG_ERR_MEMORY = 1001;
101 static const int GG_ERR_PORTABLE = 1002;
104 static const int GG_ERR_GENERIC = 2000;
107 static const int GG_ERR_ILLEGAL_ARGUMENT = 2001;
110 static const int GG_ERR_ILLEGAL_STATE = 2002;
113 static const int GG_ERR_UNSUPPORTED_OPERATION = 2003;
116 static const int GG_ERR_INTERRUPTED = 2004;
119 static const int GG_ERR_CLUSTER_GROUP_EMPTY = 2005;
122 static const int GG_ERR_CLUSTER_TOPOLOGY = 2006;
125 static const int GG_ERR_COMPUTE_EXECUTION_REJECTED = 2007;
128 static const int GG_ERR_COMPUTE_JOB_FAILOVER = 2008;
131 static const int GG_ERR_COMPUTE_TASK_CANCELLED = 2009;
134 static const int GG_ERR_COMPUTE_TASK_TIMEOUT = 2010;
137 static const int GG_ERR_COMPUTE_USER_UNDECLARED_EXCEPTION = 2011;
140 static const int GG_ERR_CACHE = 2012;
143 static const int GG_ERR_CACHE_LOADER = 2013;
146 static const int GG_ERR_CACHE_WRITER = 2014;
149 static const int GG_ERR_ENTRY_PROCESSOR = 2015;
152 static const int GG_ERR_CACHE_ATOMIC_UPDATE_TIMEOUT = 2016;
155 static const int GG_ERR_CACHE_PARTIAL_UPDATE = 2017;
158 static const int GG_ERR_TX_OPTIMISTIC = 2018;
161 static const int GG_ERR_TX_TIMEOUT = 2019;
164 static const int GG_ERR_TX_ROLLBACK = 2020;
167 static const int GG_ERR_TX_HEURISTIC = 2021;
170 static const int GG_ERR_AUTHENTICATION = 2022;
173 static const int GG_ERR_SECURITY = 2023;
176 static const int GG_ERR_PRODUCT_LICENSE = 2024;
179 static const int GG_ERR_UNKNOWN = -1;
186 static void ThrowIfNeeded(
GridError& err);
206 GridError(
const int32_t code,
const char* msg);
233 int32_t GetCode()
const;
240 const char* GetText()
const;
250 static void SetError(
const int jniCode,
const char* jniCls,
const char* jniMsg,
GridError* err);
GridGain API.
Definition: cache.h:35
Grid error information.
Definition: grid_error.h:70