You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/03 13:09:35 UTC

[1/3] ignite git commit: IGNITE-1364: GridError -> IgniteError.

Repository: ignite
Updated Branches:
  refs/heads/ignite-1364 a79962c59 -> 863189fdd


http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/cache/cache_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/cache/cache_impl.cpp b/modules/platform/src/main/cpp/core/src/impl/cache/cache_impl.cpp
index 176ab93..bf7a126 100644
--- a/modules/platform/src/main/cpp/core/src/impl/cache/cache_impl.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/cache/cache_impl.cpp
@@ -136,165 +136,165 @@ namespace ignite
                 return name;
             }
 
-            bool CacheImpl::IsEmpty(GridError* err)
+            bool CacheImpl::IsEmpty(IgniteError* err)
             {
                 return Size(IGNITE_PEEK_MODE_ALL, err) == 0;
             }
 
-            bool CacheImpl::ContainsKey(InputOperation& inOp, GridError* err)
+            bool CacheImpl::ContainsKey(InputOperation& inOp, IgniteError* err)
             {
                 return OutOpInternal(OP_CONTAINS_KEY, inOp, err);
             }
 
-            bool CacheImpl::ContainsKeys(InputOperation& inOp, GridError* err)
+            bool CacheImpl::ContainsKeys(InputOperation& inOp, IgniteError* err)
             {
                 return OutOpInternal(OP_CONTAINS_KEYS, inOp, err);
             }
 
-            void CacheImpl::LocalPeek(InputOperation& inOp, OutputOperation& outOp, int32_t peekModes, GridError* err)
+            void CacheImpl::LocalPeek(InputOperation& inOp, OutputOperation& outOp, int32_t peekModes, IgniteError* err)
             {
                 OutInOpInternal(OP_LOCAL_PEEK, inOp, outOp, err);
             }
 
-            void CacheImpl::Get(InputOperation& inOp, OutputOperation& outOp, GridError* err)
+            void CacheImpl::Get(InputOperation& inOp, OutputOperation& outOp, IgniteError* err)
             {
                 OutInOpInternal(OP_GET, inOp, outOp, err);
             }
 
-            void CacheImpl::GetAll(InputOperation& inOp, OutputOperation& outOp, GridError* err)
+            void CacheImpl::GetAll(InputOperation& inOp, OutputOperation& outOp, IgniteError* err)
             {
                 OutInOpInternal(OP_GET_ALL, inOp, outOp, err);
             }
 
-            void CacheImpl::Put(InputOperation& inOp, GridError* err)
+            void CacheImpl::Put(InputOperation& inOp, IgniteError* err)
             {
                 OutOpInternal(OP_PUT, inOp, err);
             }
 
-            void CacheImpl::PutAll(ignite::impl::InputOperation& inOp, GridError* err)
+            void CacheImpl::PutAll(ignite::impl::InputOperation& inOp, IgniteError* err)
             {
                 OutOpInternal(OP_PUT_ALL, inOp, err);
             }
 
-            void CacheImpl::GetAndPut(InputOperation& inOp, OutputOperation& outOp, GridError* err)
+            void CacheImpl::GetAndPut(InputOperation& inOp, OutputOperation& outOp, IgniteError* err)
             {
                 OutInOpInternal(OP_GET_AND_PUT, inOp, outOp, err);
             }
 
-            void CacheImpl::GetAndReplace(InputOperation& inOp, OutputOperation& outOp, GridError* err)
+            void CacheImpl::GetAndReplace(InputOperation& inOp, OutputOperation& outOp, IgniteError* err)
             {
                 OutInOpInternal(OP_GET_AND_REPLACE, inOp, outOp, err);
             }
 
-            void CacheImpl::GetAndRemove(InputOperation& inOp, OutputOperation& outOp, GridError* err)
+            void CacheImpl::GetAndRemove(InputOperation& inOp, OutputOperation& outOp, IgniteError* err)
             {
                 OutInOpInternal(OP_GET_AND_REMOVE, inOp, outOp, err);
             }
 
-            bool CacheImpl::PutIfAbsent(InputOperation& inOp, GridError* err)
+            bool CacheImpl::PutIfAbsent(InputOperation& inOp, IgniteError* err)
             {
                 return OutOpInternal(OP_PUT_IF_ABSENT, inOp, err);
             }
 
-            void CacheImpl::GetAndPutIfAbsent(InputOperation& inOp, OutputOperation& outOp, GridError* err)
+            void CacheImpl::GetAndPutIfAbsent(InputOperation& inOp, OutputOperation& outOp, IgniteError* err)
             {
                 OutInOpInternal(OP_GET_AND_PUT_IF_ABSENT, inOp, outOp, err);
             }
 
-            bool CacheImpl::Replace(InputOperation& inOp, GridError* err)
+            bool CacheImpl::Replace(InputOperation& inOp, IgniteError* err)
             {
                 return OutOpInternal(OP_REPLACE_2, inOp, err);
             }
 
-            bool CacheImpl::ReplaceIfEqual(InputOperation& inOp, GridError* err)
+            bool CacheImpl::ReplaceIfEqual(InputOperation& inOp, IgniteError* err)
             {
                 return OutOpInternal(OP_REPLACE_3, inOp, err);
             }
 
-            void CacheImpl::LocalEvict(InputOperation& inOp, GridError* err)
+            void CacheImpl::LocalEvict(InputOperation& inOp, IgniteError* err)
             {
                 OutOpInternal(OP_LOCAL_EVICT, inOp, err);
             }
 
-            void CacheImpl::Clear(GridError* err)
+            void CacheImpl::Clear(IgniteError* err)
             {
                 JniErrorInfo jniErr;
 
                 env.Get()->Context()->CacheClear(javaRef, &jniErr);
 
-                GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
             }
 
-            void CacheImpl::Clear(InputOperation& inOp, GridError* err)
+            void CacheImpl::Clear(InputOperation& inOp, IgniteError* err)
             {
                 OutOpInternal(OP_CLEAR, inOp, err);
             }
 
-            void CacheImpl::ClearAll(InputOperation& inOp, GridError* err)
+            void CacheImpl::ClearAll(InputOperation& inOp, IgniteError* err)
             {
                 OutOpInternal(OP_CLEAR_ALL, inOp, err);
             }
 
-            void CacheImpl::LocalClear(InputOperation& inOp, GridError* err)
+            void CacheImpl::LocalClear(InputOperation& inOp, IgniteError* err)
             {
                 OutOpInternal(OP_LOCAL_CLEAR, inOp, err);
             }
 
-            void CacheImpl::LocalClearAll(InputOperation& inOp, GridError* err)
+            void CacheImpl::LocalClearAll(InputOperation& inOp, IgniteError* err)
             {
                 OutOpInternal(OP_LOCAL_CLEAR_ALL, inOp, err);
             }
 
-            bool CacheImpl::Remove(InputOperation& inOp, GridError* err)
+            bool CacheImpl::Remove(InputOperation& inOp, IgniteError* err)
             {
                 return OutOpInternal(OP_REMOVE_1, inOp, err);
             }
 
-            bool CacheImpl::RemoveIfEqual(InputOperation& inOp, GridError* err)
+            bool CacheImpl::RemoveIfEqual(InputOperation& inOp, IgniteError* err)
             {
                 return OutOpInternal(OP_REMOVE_2, inOp, err);
             }
 
-            void CacheImpl::RemoveAll(InputOperation& inOp, GridError* err)
+            void CacheImpl::RemoveAll(InputOperation& inOp, IgniteError* err)
             {
                 OutOpInternal(OP_REMOVE_ALL, inOp, err);
             }
 
-            void CacheImpl::RemoveAll(GridError* err)
+            void CacheImpl::RemoveAll(IgniteError* err)
             {
                 JniErrorInfo jniErr;
 
                 env.Get()->Context()->CacheRemoveAll(javaRef, &jniErr);
 
-                GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
             }
 
-            int32_t CacheImpl::Size(const int32_t peekModes, GridError* err)
+            int32_t CacheImpl::Size(const int32_t peekModes, IgniteError* err)
             {
                 return SizeInternal(peekModes, false, err);
             }
 
-            int32_t CacheImpl::LocalSize(const int32_t peekModes, GridError* err)
+            int32_t CacheImpl::LocalSize(const int32_t peekModes, IgniteError* err)
             {
                 return SizeInternal(peekModes, true, err);
             }
 
-            QueryCursorImpl* CacheImpl::QuerySql(const SqlQuery& qry, GridError* err)
+            QueryCursorImpl* CacheImpl::QuerySql(const SqlQuery& qry, IgniteError* err)
             {
                 return QueryInternal(qry, OP_QRY_SQL, err);
             }
 
-            QueryCursorImpl* CacheImpl::QueryText(const TextQuery& qry, GridError* err)
+            QueryCursorImpl* CacheImpl::QueryText(const TextQuery& qry, IgniteError* err)
             {
                 return QueryInternal(qry, OP_QRY_TEXT, err);
             }
 
-            QueryCursorImpl* CacheImpl::QueryScan(const ScanQuery& qry, GridError* err)
+            QueryCursorImpl* CacheImpl::QueryScan(const ScanQuery& qry, IgniteError* err)
             {
                 return QueryInternal(qry, OP_QRY_SCAN, err);
             }
 
-            int64_t CacheImpl::WriteTo(InteropMemory* mem, InputOperation& inOp, GridError* err)
+            int64_t CacheImpl::WriteTo(InteropMemory* mem, InputOperation& inOp, IgniteError* err)
             {
                 PortableMetadataManager* metaMgr = env.Get()->GetMetadataManager();
 
@@ -327,13 +327,13 @@ namespace ignite
                 outOp.ProcessOutput(reader);
             }
 
-            int CacheImpl::SizeInternal(const int32_t peekModes, const bool loc, GridError* err)
+            int CacheImpl::SizeInternal(const int32_t peekModes, const bool loc, IgniteError* err)
             {
                 JniErrorInfo jniErr;
 
                 int res = env.Get()->Context()->CacheSize(javaRef, peekModes, loc, &jniErr);
 
-                GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                 if (jniErr.code == IGNITE_JNI_ERR_SUCCESS)
                     return res;
@@ -341,7 +341,7 @@ namespace ignite
                     return -1;
             }
 
-            bool CacheImpl::OutOpInternal(const int32_t opType, InputOperation& inOp, GridError* err)
+            bool CacheImpl::OutOpInternal(const int32_t opType, InputOperation& inOp, IgniteError* err)
             {
                 JniErrorInfo jniErr;
 
@@ -353,7 +353,7 @@ namespace ignite
                 {
                     long long res = env.Get()->Context()->TargetInStreamOutLong(javaRef, opType, outPtr, &jniErr);
 
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                     if (jniErr.code == IGNITE_JNI_ERR_SUCCESS)
                         return res == 1;
@@ -363,7 +363,7 @@ namespace ignite
             }
 
             void CacheImpl::OutInOpInternal(const int32_t opType, InputOperation& inOp, OutputOperation& outOp, 
-                GridError* err)
+                IgniteError* err)
             {
                 JniErrorInfo jniErr;
 
@@ -377,7 +377,7 @@ namespace ignite
                     env.Get()->Context()->TargetInStreamOutStream(javaRef, opType, WriteTo(outMem.Get(), inOp, err), 
                         inMem.Get()->PointerLong(), &jniErr);
 
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                     if (jniErr.code == IGNITE_JNI_ERR_SUCCESS)
                         ReadFrom(inMem.Get(), outOp);

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/cache/query/query_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/cache/query/query_impl.cpp b/modules/platform/src/main/cpp/core/src/impl/cache/query/query_impl.cpp
index 6196902..eb42a3e 100644
--- a/modules/platform/src/main/cpp/core/src/impl/cache/query/query_impl.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/cache/query/query_impl.cpp
@@ -51,12 +51,12 @@ namespace ignite
                     JniContext::Release(javaRef);
                 }
 
-                bool QueryCursorImpl::HasNext(GridError* err)
+                bool QueryCursorImpl::HasNext(IgniteError* err)
                 {
                     // Check whether GetAll() was called earlier.
                     if (getAllCalled) 
                     {
-                        *err = GridError(GridError::IGNITE_ERR_GENERIC, 
+                        *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC, 
                             "Cannot use HasNext() method because GetAll() was called.");
 
                         return false;
@@ -69,12 +69,12 @@ namespace ignite
                     return hasNext;
                 }
 
-                void QueryCursorImpl::GetNext(OutputOperation& op, GridError* err)
+                void QueryCursorImpl::GetNext(OutputOperation& op, IgniteError* err)
                 {
                     // Check whether GetAll() was called earlier.
                     if (getAllCalled) 
                     {
-                        *err = GridError(GridError::IGNITE_ERR_GENERIC, 
+                        *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC, 
                             "Cannot use GetNext() method because GetAll() was called.");
 
                         return;
@@ -92,7 +92,7 @@ namespace ignite
 
                         env.Get()->Context()->TargetOutStream(javaRef, OP_GET_SINGLE, inMem.Get()->PointerLong(), &jniErr);
 
-                        GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                        IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                         if (jniErr.code == IGNITE_JNI_ERR_SUCCESS)
                         {
@@ -108,17 +108,17 @@ namespace ignite
                     else
                     {
                         // Ensure we do not overwrite possible previous error.
-                        if (err->GetCode() == GridError::IGNITE_SUCCESS)
-                            *err = GridError(GridError::IGNITE_ERR_GENERIC, "No more elements available.");
+                        if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
+                            *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC, "No more elements available.");
                     }
                 }
 
-                void QueryCursorImpl::GetAll(OutputOperation& op, GridError* err)
+                void QueryCursorImpl::GetAll(OutputOperation& op, IgniteError* err)
                 {
                     // Check whether any of iterator methods were called.
                     if (iterCalled)
                     {
-                        *err = GridError(GridError::IGNITE_ERR_GENERIC,
+                        *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                             "Cannot use GetAll() method because an iteration method was called.");
 
                         return;
@@ -127,7 +127,7 @@ namespace ignite
                     // Check whether GetAll was called before.
                     if (getAllCalled)
                     {
-                        *err = GridError(GridError::IGNITE_ERR_GENERIC,
+                        *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                             "Cannot use GetNext() method because GetAll() was called.");
 
                         return;
@@ -140,7 +140,7 @@ namespace ignite
 
                     env.Get()->Context()->TargetOutStream(javaRef, OP_GET_ALL, inMem.Get()->PointerLong(), &jniErr);
 
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                     if (jniErr.code == IGNITE_JNI_ERR_SUCCESS)
                     {
@@ -154,7 +154,7 @@ namespace ignite
                     }
                 }
 
-                bool QueryCursorImpl::CreateIteratorIfNeeded(GridError* err)
+                bool QueryCursorImpl::CreateIteratorIfNeeded(IgniteError* err)
                 {
                     if (!iterCalled)
                     {
@@ -162,7 +162,7 @@ namespace ignite
 
                         env.Get()->Context()->QueryCursorIterator(javaRef, &jniErr);
 
-                        GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                        IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                         if (jniErr.code == IGNITE_JNI_ERR_SUCCESS)
                         {
@@ -177,13 +177,13 @@ namespace ignite
                     return true;
                 }
 
-                bool QueryCursorImpl::IteratorHasNext(GridError* err)
+                bool QueryCursorImpl::IteratorHasNext(IgniteError* err)
                 {
                     JniErrorInfo jniErr;
 
                     bool res = env.Get()->Context()->QueryCursorIteratorHasNext(javaRef, &jniErr);
 
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                     return jniErr.code == IGNITE_JNI_ERR_SUCCESS && res;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp b/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp
index 551d3a5..72340ee 100644
--- a/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/interop/interop_input_stream.cpp
@@ -18,7 +18,7 @@
 #include <cstring>
 
 #include "ignite/impl/interop/interop_input_stream.h"
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 
 /**
  * Common macro to read a single value.
@@ -176,7 +176,7 @@ namespace ignite
             void InteropInputStream::Position(int32_t pos)
             {
                 if (pos > len) {
-                    IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_MEMORY, "Requested input stream position is out of bounds",
+                    IGNITE_ERROR_FORMATTED_3(IgniteError::IGNITE_ERR_MEMORY, "Requested input stream position is out of bounds",
                         "memPtr", mem->PointerLong(), "len", len, "pos", pos);
                 }
 
@@ -192,7 +192,7 @@ namespace ignite
             void InteropInputStream::EnsureEnoughData(int32_t cnt)
             {
                 if (len - pos < cnt) {
-                    IGNITE_ERROR_FORMATTED_4(GridError::IGNITE_ERR_MEMORY, "Not enough data in the stream",
+                    IGNITE_ERROR_FORMATTED_4(IgniteError::IGNITE_ERR_MEMORY, "Not enough data in the stream",
                         "memPtr", mem->PointerLong(), "len", len, "pos", pos, "requested", cnt);
                 }
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp b/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp
index 04af510..05ba8b6 100644
--- a/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/interop/interop_memory.cpp
@@ -18,7 +18,7 @@
 #include <ignite/common/java.h>
 
 #include "ignite/impl/interop/interop_memory.h"
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 
 using namespace ignite::common::java;
 
@@ -173,7 +173,7 @@ namespace ignite
             void InteropExternalMemory::Reallocate(int32_t cap)
             {
                 if (JniContext::Reallocate(reinterpret_cast<int64_t>(memPtr), cap) == -1) {
-                    IGNITE_ERROR_FORMATTED_2(GridError::IGNITE_ERR_MEMORY, "Failed to reallocate external memory", 
+                    IGNITE_ERROR_FORMATTED_2(IgniteError::IGNITE_ERR_MEMORY, "Failed to reallocate external memory", 
                         "memPtr", PointerLong(), "requestedCapacity", cap)
                 }
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp b/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp
index 56c428c..ecdfd42 100644
--- a/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/interop/interop_output_stream.cpp
@@ -18,7 +18,7 @@
 #include <cstring>
 
 #include "ignite/impl/interop/interop_output_stream.h"
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 
 /**
  * Common macro to write a single value.

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_manager.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_manager.cpp b/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_manager.cpp
index 9ecf5ab..63e92a9 100644
--- a/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_manager.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_manager.cpp
@@ -105,7 +105,7 @@ namespace ignite
                 return pendingVer > oldVer;
             }
 
-            bool PortableMetadataManager::ProcessPendingUpdates(PortableMetadataUpdater* updater, GridError* err)
+            bool PortableMetadataManager::ProcessPendingUpdates(PortableMetadataUpdater* updater, IgniteError* err)
             {
                 bool success = true; // Optimistically assume that all will be fine.
                 

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_updater_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_updater_impl.cpp b/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_updater_impl.cpp
index 472938d..acaa1fe 100644
--- a/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_updater_impl.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/portable/portable_metadata_updater_impl.cpp
@@ -46,7 +46,7 @@ namespace ignite
                 // No-op.
             }
 
-            bool PortableMetadataUpdaterImpl::Update(Snap* snap, GridError* err)
+            bool PortableMetadataUpdaterImpl::Update(Snap* snap, IgniteError* err)
             {
                 JniErrorInfo jniErr;
 
@@ -82,7 +82,7 @@ namespace ignite
 
                 long long res = env.Get()->Context()->TargetInStreamOutLong(javaRef, OP_METADATA, mem.Get()->PointerLong(), &jniErr);
 
-                GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                 if (jniErr.code == IGNITE_JNI_ERR_SUCCESS)
                     return res == 1;

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp b/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp
index 386ccd3..753ec25 100644
--- a/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/portable/portable_reader_impl.cpp
@@ -21,7 +21,7 @@
 #include "ignite/impl/portable/portable_reader_impl.h"
 #include "ignite/impl/portable/portable_utils.h"
 #include "ignite/portable/portable_type.h"
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 
 using namespace ignite::impl::interop;
 using namespace ignite::impl::portable;
@@ -551,7 +551,7 @@ namespace ignite
                 else {
                     int32_t pos = stream->Position() - 1;
 
-                    IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", IGNITE_TYPE_UUID, "actual", typeId)
+                    IGNITE_ERROR_FORMATTED_3(IgniteError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", IGNITE_TYPE_UUID, "actual", typeId)
                 }
             }
 
@@ -603,20 +603,20 @@ namespace ignite
             void PortableReaderImpl::CheckRawMode(bool expected)
             {
                 if (expected && !rawMode) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation can be performed only in raw mode.")
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation can be performed only in raw mode.")
                 }
                 else if (!expected && rawMode) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation cannot be performed in raw mode.")
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation cannot be performed in raw mode.")
                 }
             }
 
             void PortableReaderImpl::CheckSingleMode(bool expected)
             {
                 if (expected && elemId != 0) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation cannot be performed when container is being read.");
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation cannot be performed when container is being read.");
                 }
                 else if (!expected && elemId == 0) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation can be performed only when container is being read.");
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation can be performed only when container is being read.");
                 }
             }
 
@@ -663,13 +663,13 @@ namespace ignite
             void PortableReaderImpl::CheckSession(int32_t expSes)
             {
                 if (elemId != expSes) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Containter read session has been finished or is not started yet.");
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Containter read session has been finished or is not started yet.");
                 }
             }
 
             void PortableReaderImpl::ThrowOnInvalidHeader(int32_t pos, int8_t expHdr, int8_t hdr)
             {
-                IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", hdr)
+                IGNITE_ERROR_FORMATTED_3(IgniteError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", hdr)
             }
 
             void PortableReaderImpl::ThrowOnInvalidHeader(int8_t expHdr, int8_t hdr)

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/impl/portable/portable_writer_impl.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/impl/portable/portable_writer_impl.cpp b/modules/platform/src/main/cpp/core/src/impl/portable/portable_writer_impl.cpp
index 5e39f54..93aacd9 100644
--- a/modules/platform/src/main/cpp/core/src/impl/portable/portable_writer_impl.cpp
+++ b/modules/platform/src/main/cpp/core/src/impl/portable/portable_writer_impl.cpp
@@ -16,7 +16,7 @@
  */
 
 #include "ignite/impl/portable/portable_writer_impl.h"
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 
 using namespace ignite::impl::interop;
 using namespace ignite::impl::portable;
@@ -479,20 +479,20 @@ namespace ignite
                 bool rawMode = rawPos != -1;
 
                 if (expected && !rawMode) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation can be performed only in raw mode.");
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation can be performed only in raw mode.");
                 }
                 else if (!expected && rawMode) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation cannot be performed in raw mode.");
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation cannot be performed in raw mode.");
                 }
             }
 
             void PortableWriterImpl::CheckSingleMode(bool expected)
             {
                 if (expected && elemId != 0) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation cannot be performed when container is being written.");
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation cannot be performed when container is being written.");
                 }
                 else if (!expected && elemId == 0) {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Operation can be performed only when container is being written.");
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Operation can be performed only when container is being written.");
                 }
             }
 
@@ -509,7 +509,7 @@ namespace ignite
             {
                 if (elemId != expSes) 
                 {
-                    IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Containter write session has been finished or is not started yet.");
+                    IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Containter write session has been finished or is not started yet.");
                 }
             }
 


[3/3] ignite git commit: IGNITE-1364: GridError -> IgniteError.

Posted by vo...@apache.org.
IGNITE-1364: GridError -> IgniteError.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/863189fd
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/863189fd
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/863189fd

Branch: refs/heads/ignite-1364
Commit: 863189fdd23b88809223f7509791eb660053a7df
Parents: a79962c
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Sep 3 14:10:14 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Sep 3 14:10:14 2015 +0300

----------------------------------------------------------------------
 .../main/cpp/core-test/src/cache_query_test.cpp |  16 +-
 .../src/main/cpp/core-test/src/cache_test.cpp   |   8 +-
 .../cpp/core-test/src/grid_factory_test.cpp     |  14 +-
 .../src/portable_reader_writer_raw_test.cpp     | 196 +++++++-------
 .../src/portable_reader_writer_test.cpp         | 252 +++++++++---------
 modules/platform/src/main/cpp/core/Makefile.am  |   2 +-
 .../src/main/cpp/core/include/Makefile.am       |   2 +-
 .../main/cpp/core/include/ignite/cache/cache.h  | 186 ++++++-------
 .../include/ignite/cache/query/query_cursor.h   |  28 +-
 .../src/main/cpp/core/include/ignite/grid.h     |  18 +-
 .../main/cpp/core/include/ignite/grid_error.h   | 260 -------------------
 .../main/cpp/core/include/ignite/grid_factory.h |  16 +-
 .../main/cpp/core/include/ignite/ignite_error.h | 260 +++++++++++++++++++
 .../core/include/ignite/impl/cache/cache_impl.h |  72 ++---
 .../ignite/impl/cache/query/query_impl.h        |  12 +-
 .../cpp/core/include/ignite/impl/grid_impl.h    |  12 +-
 .../ignite/impl/portable/portable_id_resolver.h |   2 +-
 .../impl/portable/portable_metadata_manager.h   |   4 +-
 .../impl/portable/portable_metadata_updater.h   |   4 +-
 .../portable/portable_metadata_updater_impl.h   |   2 +-
 .../ignite/impl/portable/portable_reader_impl.h |  10 +-
 .../include/ignite/portable/portable_type.h     |  12 +-
 .../src/main/cpp/core/project/vs/core.vcxproj   |   4 +-
 .../cpp/core/project/vs/core.vcxproj.filters    |   4 +-
 .../main/cpp/core/project/vs/core.vcxprojrel    |   4 +-
 .../src/main/cpp/core/src/grid_error.cpp        | 222 ----------------
 .../src/main/cpp/core/src/grid_factory.cpp      |  70 ++---
 .../src/main/cpp/core/src/ignite_error.cpp      | 222 ++++++++++++++++
 .../main/cpp/core/src/impl/cache/cache_impl.cpp |  78 +++---
 .../core/src/impl/cache/query/query_impl.cpp    |  30 +--
 .../src/impl/interop/interop_input_stream.cpp   |   6 +-
 .../core/src/impl/interop/interop_memory.cpp    |   4 +-
 .../src/impl/interop/interop_output_stream.cpp  |   2 +-
 .../impl/portable/portable_metadata_manager.cpp |   2 +-
 .../portable/portable_metadata_updater_impl.cpp |   4 +-
 .../src/impl/portable/portable_reader_impl.cpp  |  16 +-
 .../src/impl/portable/portable_writer_impl.cpp  |  12 +-
 37 files changed, 1034 insertions(+), 1034 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp b/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
index 4ad5278..ad3fb15 100644
--- a/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/cache_query_test.cpp
@@ -208,11 +208,11 @@ struct CacheQueryTestSuiteFixture {
 
         cfg.springCfgPath = const_cast<char*>(cfgPathStr.c_str());
 
-        GridError err;
+        IgniteError err;
 
         Grid grid0 = GridFactory::Start(cfg, &err);
 
-        if (err.GetCode() != GridError::IGNITE_SUCCESS)
+        if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
             BOOST_ERROR(err.GetText());
 
         grid = grid0;
@@ -240,9 +240,9 @@ void CheckHasNextFail(QueryCursor<int, QueryPerson>& cur)
 
         BOOST_FAIL("Must fail.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_GENERIC);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);
     }
 }
 
@@ -259,9 +259,9 @@ void CheckGetNextFail(QueryCursor<int, QueryPerson>& cur)
 
         BOOST_FAIL("Must fail.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_GENERIC);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);
     }
 }
 
@@ -280,9 +280,9 @@ void CheckGetAllFail(QueryCursor<int, QueryPerson>& cur)
 
         BOOST_FAIL("Must fail.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_GENERIC);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/cache_test.cpp b/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
index b9ae672..7d0cbce 100644
--- a/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/cache_test.cpp
@@ -121,11 +121,11 @@ struct CacheTestSuiteFixture {
 
             stream << "grid-" << i;
 
-            GridError err;
+            IgniteError err;
 
             Grid grid = GridFactory::Start(cfg, stream.str().c_str(), &err);
                 
-            if (err.GetCode() != GridError::IGNITE_SUCCESS)
+            if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
                 BOOST_FAIL(err.GetText());
 
             if (i == 0)
@@ -454,11 +454,11 @@ BOOST_AUTO_TEST_CASE(TestCreateCache)
     BOOST_REQUIRE(7 == cache.Get(5));
 
     // Attempt to create cache with existing name
-    GridError err;
+    IgniteError err;
 
     grid0.CreateCache<int, int>("dynamic_cache", &err);
 
-    BOOST_REQUIRE(err.GetCode() != GridError::IGNITE_SUCCESS);
+    BOOST_REQUIRE(err.GetCode() != IgniteError::IGNITE_SUCCESS);
 }
 
 BOOST_AUTO_TEST_CASE(TestGetOrCreateCache)

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core-test/src/grid_factory_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/grid_factory_test.cpp b/modules/platform/src/main/cpp/core-test/src/grid_factory_test.cpp
index 575b5c7..61a1a29 100644
--- a/modules/platform/src/main/cpp/core-test/src/grid_factory_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/grid_factory_test.cpp
@@ -53,19 +53,19 @@ BOOST_AUTO_TEST_CASE(TestGridFactory)
 
     cfg.springCfgPath = const_cast<char*>(cfgPathStr.c_str());
 
-    GridError err;
+    IgniteError err;
 
     // Start two grids
     Grid grid1 = GridFactory::Start(cfg, "gridFactoryTest-1", &err);
     
-    if (err.GetCode() != GridError::IGNITE_SUCCESS)
+    if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
     
     BOOST_REQUIRE(strcmp(grid1.GetName(), "gridFactoryTest-1") == 0);
 
     Grid grid2 = GridFactory::Start(cfg, "gridFactoryTest-2", &err);
 
-    if (err.GetCode() != GridError::IGNITE_SUCCESS)
+    if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
 
     BOOST_REQUIRE(strcmp(grid2.GetName(), "gridFactoryTest-2") == 0);
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(TestGridFactory)
     // Test get
     Grid grid0 = GridFactory::Get("gridFactoryTest-1", &err);
     
-    if (err.GetCode() != GridError::IGNITE_SUCCESS)
+    if (err.GetCode() != IgniteError::IGNITE_SUCCESS)
         BOOST_ERROR(err.GetText());
 
     BOOST_REQUIRE(strcmp(grid0.GetName(), grid1.GetName()) == 0);
@@ -82,16 +82,16 @@ BOOST_AUTO_TEST_CASE(TestGridFactory)
     GridFactory::Stop(grid1.GetName(), true);
     
     GridFactory::Get("gridFactoryTest-1", &err);
-    BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_GENERIC);
+    BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);
     
     GridFactory::Get("gridFactoryTest-2", &err);
-    BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_SUCCESS);
+    BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_SUCCESS);
 
     // Stop all
     GridFactory::StopAll(true);
     
     GridFactory::Get("gridFactoryTest-2", &err);
-    BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_GENERIC);    
+    BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_GENERIC);    
 }
 
 BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp b/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp
index c717372..c3a98aa 100644
--- a/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_raw_test.cpp
@@ -177,9 +177,9 @@ void CheckRawWritesRestricted(PortableRawWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -190,9 +190,9 @@ void CheckRawWritesRestricted(PortableRawWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -203,9 +203,9 @@ void CheckRawWritesRestricted(PortableRawWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -214,9 +214,9 @@ void CheckRawWritesRestricted(PortableRawWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try 
@@ -225,9 +225,9 @@ void CheckRawWritesRestricted(PortableRawWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try 
@@ -236,9 +236,9 @@ void CheckRawWritesRestricted(PortableRawWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try 
@@ -247,9 +247,9 @@ void CheckRawWritesRestricted(PortableRawWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 }
 
@@ -261,9 +261,9 @@ void CheckRawReadsRestricted(PortableRawReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -274,9 +274,9 @@ void CheckRawReadsRestricted(PortableRawReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -285,9 +285,9 @@ void CheckRawReadsRestricted(PortableRawReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -296,9 +296,9 @@ void CheckRawReadsRestricted(PortableRawReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -307,9 +307,9 @@ void CheckRawReadsRestricted(PortableRawReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -318,9 +318,9 @@ void CheckRawReadsRestricted(PortableRawReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -329,9 +329,9 @@ void CheckRawReadsRestricted(PortableRawReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 }
 
@@ -358,9 +358,9 @@ void CheckRawCollectionEmpty(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -369,9 +369,9 @@ void CheckRawCollectionEmpty(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -397,9 +397,9 @@ void CheckRawCollectionEmpty(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -436,9 +436,9 @@ void CheckRawCollection(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -447,9 +447,9 @@ void CheckRawCollection(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -487,9 +487,9 @@ void CheckRawCollection(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -518,9 +518,9 @@ void CheckRawMapEmpty(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -529,9 +529,9 @@ void CheckRawMapEmpty(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -560,9 +560,9 @@ void CheckRawMapEmpty(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -599,9 +599,9 @@ void CheckRawMap(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -610,9 +610,9 @@ void CheckRawMap(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -658,9 +658,9 @@ void CheckRawMap(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -865,9 +865,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -876,9 +876,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -908,9 +908,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -921,9 +921,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -934,9 +934,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -945,9 +945,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -970,9 +970,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -981,9 +981,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -1023,9 +1023,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1036,9 +1036,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1049,9 +1049,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1060,9 +1060,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -1133,9 +1133,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1144,9 +1144,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -1246,9 +1246,9 @@ BOOST_AUTO_TEST_CASE(TestArrayNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -1276,9 +1276,9 @@ BOOST_AUTO_TEST_CASE(TestArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1287,9 +1287,9 @@ BOOST_AUTO_TEST_CASE(TestArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -1310,9 +1310,9 @@ BOOST_AUTO_TEST_CASE(TestArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -1348,9 +1348,9 @@ BOOST_AUTO_TEST_CASE(TestArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1359,9 +1359,9 @@ BOOST_AUTO_TEST_CASE(TestArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -1394,9 +1394,9 @@ BOOST_AUTO_TEST_CASE(TestArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -1432,9 +1432,9 @@ BOOST_AUTO_TEST_CASE(TestCollectionNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -1497,9 +1497,9 @@ BOOST_AUTO_TEST_CASE(TestMapNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp b/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp
index ee27df8..aff929b 100644
--- a/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp
+++ b/modules/platform/src/main/cpp/core-test/src/portable_reader_writer_test.cpp
@@ -52,9 +52,9 @@ void CheckPrimitive(T val)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     Write<T>(writer, "test", val);
@@ -74,9 +74,9 @@ void CheckPrimitive(T val)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     T readVal = Read<T>(reader, "test");
@@ -114,9 +114,9 @@ void CheckPrimitiveArray(T dflt, T val1, T val2)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
     
     // 1. Write NULL and see what happens.
@@ -216,9 +216,9 @@ void CheckPrimitiveArray(T dflt, T val1, T val2)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(ReadArray<T>(reader, fieldName, arr1, 0) == 2);
@@ -242,9 +242,9 @@ void CheckWritesRestricted(PortableWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -255,9 +255,9 @@ void CheckWritesRestricted(PortableWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -268,9 +268,9 @@ void CheckWritesRestricted(PortableWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -279,9 +279,9 @@ void CheckWritesRestricted(PortableWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try 
@@ -290,9 +290,9 @@ void CheckWritesRestricted(PortableWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try 
@@ -301,9 +301,9 @@ void CheckWritesRestricted(PortableWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try 
@@ -312,9 +312,9 @@ void CheckWritesRestricted(PortableWriter& writer)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 }
 
@@ -326,9 +326,9 @@ void CheckReadsRestricted(PortableReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -339,9 +339,9 @@ void CheckReadsRestricted(PortableReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -350,9 +350,9 @@ void CheckReadsRestricted(PortableReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -361,9 +361,9 @@ void CheckReadsRestricted(PortableReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -372,9 +372,9 @@ void CheckReadsRestricted(PortableReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -383,9 +383,9 @@ void CheckReadsRestricted(PortableReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -394,9 +394,9 @@ void CheckReadsRestricted(PortableReader& reader)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 }
 
@@ -427,9 +427,9 @@ void CheckCollectionEmpty(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -438,9 +438,9 @@ void CheckCollectionEmpty(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -468,9 +468,9 @@ void CheckCollectionEmpty(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -511,9 +511,9 @@ void CheckCollection(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -522,9 +522,9 @@ void CheckCollection(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -564,9 +564,9 @@ void CheckCollection(CollectionType* colType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -599,9 +599,9 @@ void CheckMapEmpty(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -610,9 +610,9 @@ void CheckMapEmpty(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -643,9 +643,9 @@ void CheckMapEmpty(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -686,9 +686,9 @@ void CheckMap(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -697,9 +697,9 @@ void CheckMap(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -747,9 +747,9 @@ void CheckMap(MapType* mapType)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -871,9 +871,9 @@ BOOST_AUTO_TEST_CASE(TestGuidNull)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     writer.WriteNull("test");
@@ -892,9 +892,9 @@ BOOST_AUTO_TEST_CASE(TestGuidNull)
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     Guid expVal;
@@ -924,9 +924,9 @@ BOOST_AUTO_TEST_CASE(TestString) {
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -935,9 +935,9 @@ BOOST_AUTO_TEST_CASE(TestString) {
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -946,9 +946,9 @@ BOOST_AUTO_TEST_CASE(TestString) {
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     writer.WriteString("field1", writeVal1);
@@ -973,9 +973,9 @@ BOOST_AUTO_TEST_CASE(TestString) {
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -984,9 +984,9 @@ BOOST_AUTO_TEST_CASE(TestString) {
 
         BOOST_FAIL("Not restricted.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     char readVal1[9];
@@ -1051,9 +1051,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1062,9 +1062,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -1098,9 +1098,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1111,9 +1111,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1124,9 +1124,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1135,9 +1135,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -1162,9 +1162,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1173,9 +1173,9 @@ BOOST_AUTO_TEST_CASE(TestStringArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -1219,9 +1219,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1232,9 +1232,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1245,9 +1245,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1256,9 +1256,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -1331,9 +1331,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1342,9 +1342,9 @@ BOOST_AUTO_TEST_CASE(TestStringArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -1462,9 +1462,9 @@ BOOST_AUTO_TEST_CASE(TestArrayNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -1496,9 +1496,9 @@ BOOST_AUTO_TEST_CASE(TestArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1507,9 +1507,9 @@ BOOST_AUTO_TEST_CASE(TestArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -1532,9 +1532,9 @@ BOOST_AUTO_TEST_CASE(TestArrayEmpty)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -1574,9 +1574,9 @@ BOOST_AUTO_TEST_CASE(TestArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     try
@@ -1585,9 +1585,9 @@ BOOST_AUTO_TEST_CASE(TestArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     out.Synchronize();
@@ -1622,9 +1622,9 @@ BOOST_AUTO_TEST_CASE(TestArray)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -1666,9 +1666,9 @@ BOOST_AUTO_TEST_CASE(TestCollectionNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -1737,9 +1737,9 @@ BOOST_AUTO_TEST_CASE(TestMapNull)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt8("field2") == 1);
@@ -1789,9 +1789,9 @@ BOOST_AUTO_TEST_CASE(TestRawMode)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     rawWriter.WriteInt8(1);
@@ -1814,9 +1814,9 @@ BOOST_AUTO_TEST_CASE(TestRawMode)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(rawReader.ReadInt8() == 1);
@@ -1895,9 +1895,9 @@ BOOST_AUTO_TEST_CASE(TestFieldSeek)
 
         BOOST_FAIL("Error expected.");
     }
-    catch (GridError& err)
+    catch (IgniteError& err)
     {
-        BOOST_REQUIRE(err.GetCode() == GridError::IGNITE_ERR_PORTABLE);
+        BOOST_REQUIRE(err.GetCode() == IgniteError::IGNITE_ERR_PORTABLE);
     }
 
     BOOST_REQUIRE(reader.ReadInt32("val2") == 2);

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/Makefile.am b/modules/platform/src/main/cpp/core/Makefile.am
index 07091c6..9cca4ea 100644
--- a/modules/platform/src/main/cpp/core/Makefile.am
+++ b/modules/platform/src/main/cpp/core/Makefile.am
@@ -25,7 +25,7 @@ AM_CXXFLAGS = -Wall -std=c++0x
 LIB_LDFLAGS = -no-undefined -version-info 1
 
 COMMON_SRC = os/linux/src/impl/utils.cpp \
-             src/grid_error.cpp \
+             src/ignite_error.cpp \
              src/guid.cpp \
              src/impl/handle_registry.cpp \
              src/impl/interop/interop_memory.cpp \

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/Makefile.am
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/Makefile.am b/modules/platform/src/main/cpp/core/include/Makefile.am
index e938e1c..f5a067a 100644
--- a/modules/platform/src/main/cpp/core/include/Makefile.am
+++ b/modules/platform/src/main/cpp/core/include/Makefile.am
@@ -56,6 +56,6 @@ nobase_include_HEADERS = ignite/cache/cache.h \
                          ignite/portable/portable_writer.h \
                          ignite/grid.h \
                          ignite/grid_configuration.h \
-                         ignite/grid_error.h \
+                         ignite/ignite_error.h \
                          ignite/grid_factory.h \
                          ignite/guid.h

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/cache/cache.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/cache/cache.h b/modules/platform/src/main/cpp/core/include/ignite/cache/cache.h
index 628caa8..dcc837b 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/cache/cache.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/cache/cache.h
@@ -31,7 +31,7 @@
 #include "ignite/cache/query/query_text.h"
 #include "ignite/impl/cache/cache_impl.h"
 #include "ignite/impl/operations.h"
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 
 namespace ignite
 {
@@ -68,11 +68,11 @@ namespace ignite
              */
             bool IsEmpty()
             {
-                GridError err;
+                IgniteError err;
 
                 bool res = IsEmpty(err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -84,7 +84,7 @@ namespace ignite
              * @param err Error.
              * @return True if cache is empty.
              */
-            bool IsEmpty(GridError& err)
+            bool IsEmpty(IgniteError& err)
             {
                 return impl.Get()->IsEmpty(&err);
             }
@@ -97,11 +97,11 @@ namespace ignite
              */
             bool ContainsKey(const K& key)
             {
-                GridError err;
+                IgniteError err;
 
                 bool res = ContainsKey(key, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -113,7 +113,7 @@ namespace ignite
              * @param err Error.
              * @return True if cache contains mapping for this key.
              */
-            bool ContainsKey(const K& key, GridError& err)
+            bool ContainsKey(const K& key, IgniteError& err)
             {
                 impl::In1Operation<K> op(&key);
 
@@ -128,11 +128,11 @@ namespace ignite
              */
             bool ContainsKeys(const std::set<K>& keys)
             {
-                GridError err;
+                IgniteError err;
 
                 bool res = ContainsKeys(keys, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -144,7 +144,7 @@ namespace ignite
              * @param err Error.
              * @return True if cache contains mapping for all these keys.
              */
-            bool ContainsKeys(const std::set<K>& keys, GridError& err)
+            bool ContainsKeys(const std::set<K>& keys, IgniteError& err)
             {
                 impl::InSetOperation<K> op(&keys);
 
@@ -164,11 +164,11 @@ namespace ignite
              */
             V LocalPeek(const K& key, int32_t peekModes)
             {
-                GridError err;
+                IgniteError err;
 
                 V res = LocalPeek(key, peekModes, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -185,7 +185,7 @@ namespace ignite
              * @param err Error.
              * @return Value.
              */
-            V LocalPeek(const K& key, int32_t peekModes, GridError& err)
+            V LocalPeek(const K& key, int32_t peekModes, IgniteError& err)
             {
                 impl::InCacheLocalPeekOperation<K> inOp(&key, peekModes);
                 impl::Out1Operation<V> outOp;
@@ -207,11 +207,11 @@ namespace ignite
              */
             V Get(const K& key)
             {
-                GridError err;
+                IgniteError err;
 
                 V res = Get(key, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -227,7 +227,7 @@ namespace ignite
              * @param err Error.
              * @return Value.
              */
-            V Get(const K& key, GridError& err)
+            V Get(const K& key, IgniteError& err)
             {
                 impl::In1Operation<K> inOp(&key);
                 impl::Out1Operation<V> outOp;
@@ -249,11 +249,11 @@ namespace ignite
              */
             std::map<K, V> GetAll(const std::set<K>& keys)
             {
-                GridError err;
+                IgniteError err;
 
                 std::map<K, V> res = GetAll(keys, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -269,7 +269,7 @@ namespace ignite
              * @param err Error.
              * @return Map of key-value pairs.
              */
-            std::map<K, V> GetAll(const std::set<K>& keys, GridError& err)
+            std::map<K, V> GetAll(const std::set<K>& keys, IgniteError& err)
             {
                 impl::InSetOperation<K> inOp(&keys);
                 impl::OutMapOperation<K, V> outOp;
@@ -289,11 +289,11 @@ namespace ignite
              */
             void Put(const K& key, const V& val)
             {
-                GridError err;
+                IgniteError err;
 
                 Put(key, val, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -305,7 +305,7 @@ namespace ignite
              * @param val Value to be associated with the specified key.
              * @param err Error.
              */
-            void Put(const K& key, const V& val, GridError& err)
+            void Put(const K& key, const V& val, IgniteError& err)
             {
                 impl::In2Operation<K, V> op(&key, &val);
 
@@ -321,11 +321,11 @@ namespace ignite
              */
             void PutAll(const std::map<K, V>& vals)
             {
-                GridError err;
+                IgniteError err;
 
                 PutAll(vals, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -336,7 +336,7 @@ namespace ignite
              * @param vals Key-value pairs to store in cache.
              * @param err Error.
              */
-            void PutAll(const std::map<K, V>& vals, GridError& err)
+            void PutAll(const std::map<K, V>& vals, IgniteError& err)
             {
                 impl::InMapOperation<K, V> op(&vals);
 
@@ -354,11 +354,11 @@ namespace ignite
              */
             V GetAndPut(const K& key, const V& val)
             {
-                GridError err;
+                IgniteError err;
 
                 V res = GetAndPut(key, val, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -373,7 +373,7 @@ namespace ignite
              * @return The value associated with the key at the start of the
              *     operation or null if none was associated.
              */
-            V GetAndPut(const K& key, const V& val, GridError& err)
+            V GetAndPut(const K& key, const V& val, IgniteError& err)
             {
                 impl::In2Operation<K, V> inOp(&key, &val);
                 impl::Out1Operation<V> outOp;
@@ -394,11 +394,11 @@ namespace ignite
              */
             V GetAndReplace(const K& key, const V& val)
             {
-                GridError err;
+                IgniteError err;
 
                 V res = GetAndReplace(key, val, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -413,7 +413,7 @@ namespace ignite
              * @return The previous value associated with the specified key, or
              *     null if there was no mapping for the key.
              */
-            V GetAndReplace(const K& key, const V& val, GridError& err)
+            V GetAndReplace(const K& key, const V& val, IgniteError& err)
             {
                 impl::In2Operation<K, V> inOp(&key, &val);
                 impl::Out1Operation<V> outOp;
@@ -431,11 +431,11 @@ namespace ignite
              */
             V GetAndRemove(const K& key)
             {
-                GridError err;
+                IgniteError err;
 
                 V res = GetAndRemove(key, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -447,7 +447,7 @@ namespace ignite
              * @param err Error.
              * @return The value if one existed or null if no mapping existed for this key.
              */
-            V GetAndRemove(const K& key, GridError& err)
+            V GetAndRemove(const K& key, IgniteError& err)
             {
                 impl::In1Operation<K> inOp(&key);
                 impl::Out1Operation<V> outOp;
@@ -467,11 +467,11 @@ namespace ignite
              */
             bool PutIfAbsent(const K& key, const V& val)
             {
-                GridError err;
+                IgniteError err;
 
                 bool res = PutIfAbsent(key, val, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -485,7 +485,7 @@ namespace ignite
              * @param err Error.
              * @return True if a value was set.
              */
-            bool PutIfAbsent(const K& key, const V& val, GridError& err)
+            bool PutIfAbsent(const K& key, const V& val, IgniteError& err)
             {
                 impl::In2Operation<K, V> op(&key, &val);
 
@@ -510,11 +510,11 @@ namespace ignite
              */
             V GetAndPutIfAbsent(const K& key, const V& val)
             {
-                GridError err;
+                IgniteError err;
 
                 V res = GetAndPutIfAbsent(key, val, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -536,7 +536,7 @@ namespace ignite
              * @return Previously contained value regardless of whether put happened or not
              *     (null if there was no previous value).
              */
-            V GetAndPutIfAbsent(const K& key, const V& val, GridError& err)
+            V GetAndPutIfAbsent(const K& key, const V& val, IgniteError& err)
             {
                 impl::In2Operation<K, V> inOp(&key, &val);
                 impl::Out1Operation<V> outOp;
@@ -561,11 +561,11 @@ namespace ignite
              */
             bool Replace(const K& key, const V& val)
             {
-                GridError err;
+                IgniteError err;
 
                 bool res = Replace(key, val, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -584,7 +584,7 @@ namespace ignite
              * @param err Error.
              * @return True if the value was replaced.
              */
-            bool Replace(const K& key, const V& val, GridError& err)
+            bool Replace(const K& key, const V& val, IgniteError& err)
             {
                 impl::In2Operation<K, V> op(&key, &val);
 
@@ -603,11 +603,11 @@ namespace ignite
              */
             bool Replace(const K& key, const V& oldVal, const V& newVal)
             {
-                GridError err;
+                IgniteError err;
 
                 bool res = Replace(key, oldVal, newVal, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -623,7 +623,7 @@ namespace ignite
              * @param err Error.
              * @return True if replace happened, false otherwise.
              */
-            bool Replace(const K& key, const V& oldVal, const V& newVal, GridError& err)
+            bool Replace(const K& key, const V& oldVal, const V& newVal, IgniteError& err)
             {
                 impl::In3Operation<K, V, V> op(&key, &oldVal, &newVal);
 
@@ -638,11 +638,11 @@ namespace ignite
              */
             void LocalEvict(const std::set<K>& keys)
             {
-                GridError err;
+                IgniteError err;
 
                 LocalEvict(keys, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -652,7 +652,7 @@ namespace ignite
              * @param keys Keys to evict from cache.
              * @param err Error.
              */
-            void LocalEvict(const std::set<K>& keys, GridError& err)
+            void LocalEvict(const std::set<K>& keys, IgniteError& err)
             {
                 impl::InSetOperation<K> op(&keys);
 
@@ -664,11 +664,11 @@ namespace ignite
              */
             void Clear()
             {
-                GridError err;
+                IgniteError err;
 
                 Clear(err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -676,7 +676,7 @@ namespace ignite
              *
              * @param err Error.
              */
-            void Clear(GridError& err)
+            void Clear(IgniteError& err)
             {
                 impl.Get()->Clear(&err);
             }
@@ -689,11 +689,11 @@ namespace ignite
              */
             void Clear(const K& key)
             {
-                GridError err;
+                IgniteError err;
 
                 Clear(key, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -703,7 +703,7 @@ namespace ignite
              * @param key Key to clear.
              * @param err Error.
              */
-            void Clear(const K& key, GridError& err)
+            void Clear(const K& key, IgniteError& err)
             {
                 impl::In1Operation<K> op(&key);
 
@@ -718,11 +718,11 @@ namespace ignite
              */
             void ClearAll(const std::set<K>& keys)
             {
-                GridError err;
+                IgniteError err;
 
                 ClearAll(keys, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -732,7 +732,7 @@ namespace ignite
              * @param keys Keys to clear.
              * @param err Error.
              */
-            void ClearAll(const std::set<K>& keys, GridError& err)
+            void ClearAll(const std::set<K>& keys, IgniteError& err)
             {
                 impl::InSetOperation<K> op(&keys);
 
@@ -749,11 +749,11 @@ namespace ignite
              */
             void LocalClear(const K& key)
             {
-                GridError err;
+                IgniteError err;
 
                 LocalClear(key, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -765,7 +765,7 @@ namespace ignite
              * @param key Key to clear.
              * @param err Error.
              */
-            void LocalClear(const K& key, GridError& err)
+            void LocalClear(const K& key, IgniteError& err)
             {
                 impl::In1Operation<K> op(&key);
 
@@ -782,11 +782,11 @@ namespace ignite
              */
             void LocalClearAll(const std::set<K>& keys)
             {
-                GridError err;
+                IgniteError err;
 
                 LocalClearAll(keys, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -798,7 +798,7 @@ namespace ignite
              * @param keys Keys to clear.
              * @param err Error.
              */
-            void LocalClearAll(const std::set<K>& keys, GridError& err)
+            void LocalClearAll(const std::set<K>& keys, IgniteError& err)
             {
                 impl::InSetOperation<K> op(&keys);
 
@@ -820,11 +820,11 @@ namespace ignite
              */
             bool Remove(const K& key)
             {
-                GridError err;
+                IgniteError err;
 
                 bool res = Remove(key, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -843,7 +843,7 @@ namespace ignite
              * @param err Error.
              * @return False if there was no matching key.
              */
-            bool Remove(const K& key, GridError& err)
+            bool Remove(const K& key, IgniteError& err)
             {
                 impl::In1Operation<K> op(&key);
 
@@ -861,11 +861,11 @@ namespace ignite
              */
             bool Remove(const K& key, const V& val)
             {
-                GridError err;
+                IgniteError err;
 
                 bool res = Remove(key, val, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -880,7 +880,7 @@ namespace ignite
              * @param err Error.
              * @return True if entry was removed, false otherwise.
              */
-            bool Remove(const K& key, const V& val, GridError& err)
+            bool Remove(const K& key, const V& val, IgniteError& err)
             {
                 impl::In2Operation<K, V> op(&key, &val);
 
@@ -896,11 +896,11 @@ namespace ignite
              */
             void RemoveAll(const std::set<K>& keys)
             {
-                GridError err;
+                IgniteError err;
 
                 RemoveAll(keys, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -911,7 +911,7 @@ namespace ignite
              * @param keys Keys whose mappings are to be removed from cache.
              * @param err Error.
              */
-            void RemoveAll(const std::set<K>& keys, GridError& err)
+            void RemoveAll(const std::set<K>& keys, IgniteError& err)
             {
                 impl::InSetOperation<K> op(&keys);
 
@@ -927,11 +927,11 @@ namespace ignite
              */
             void RemoveAll()
             {
-                GridError err;
+                IgniteError err;
 
                 RemoveAll(err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
             }
 
             /**
@@ -941,7 +941,7 @@ namespace ignite
              *
              * @param err Error.
              */
-            void RemoveAll(GridError& err)
+            void RemoveAll(IgniteError& err)
             {
                 return impl.Get()->RemoveAll(&err);
             }
@@ -962,7 +962,7 @@ namespace ignite
              * @param err Error.
              * @return Cache size on this node.
              */
-            int32_t LocalSize(GridError& err)
+            int32_t LocalSize(IgniteError& err)
             {
                 return LocalSize(IGNITE_PEEK_MODE_ALL, err);
             }
@@ -975,11 +975,11 @@ namespace ignite
              */
             int32_t LocalSize(int32_t peekModes)
             {
-                GridError err;
+                IgniteError err;
 
                 int32_t res = LocalSize(peekModes, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -991,7 +991,7 @@ namespace ignite
              * @param err Error.
              * @return Cache size on this node.
              */
-            int32_t LocalSize(int32_t peekModes, GridError& err)
+            int32_t LocalSize(int32_t peekModes, IgniteError& err)
             {
                 return impl.Get()->LocalSize(peekModes, &err);
             }
@@ -1014,7 +1014,7 @@ namespace ignite
              * @param err Error.
              * @return Cache size across all nodes.
              */
-            int32_t Size(GridError& err)
+            int32_t Size(IgniteError& err)
             {
                 return Size(ignite::cache::IGNITE_PEEK_MODE_ALL, err);
             }
@@ -1028,11 +1028,11 @@ namespace ignite
              */
             int32_t Size(int32_t peekModes)
             {
-                GridError err;
+                IgniteError err;
 
                 int32_t res = Size(peekModes, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -1045,7 +1045,7 @@ namespace ignite
              * @param err Error.
              * @return Cache size across all nodes.
              */
-            int32_t Size(int32_t peekModes, GridError& err)
+            int32_t Size(int32_t peekModes, IgniteError& err)
             {
                 return impl.Get()->Size(peekModes, &err);
             }
@@ -1058,11 +1058,11 @@ namespace ignite
              */
             query::QueryCursor<K, V> Query(const query::SqlQuery& qry)
             {
-                GridError err;
+                IgniteError err;
 
                 query::QueryCursor<K, V> res = Query(qry, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -1074,7 +1074,7 @@ namespace ignite
              * @param err Error.
              * @return Query cursor.
              */
-            query::QueryCursor<K, V> Query(const query::SqlQuery& qry, GridError& err)
+            query::QueryCursor<K, V> Query(const query::SqlQuery& qry, IgniteError& err)
             {
                 impl::cache::query::QueryCursorImpl* cursorImpl = impl.Get()->QuerySql(qry, &err);
 
@@ -1089,11 +1089,11 @@ namespace ignite
              */
             query::QueryCursor<K, V> Query(const query::TextQuery& qry)
             {
-                GridError err;
+                IgniteError err;
 
                 query::QueryCursor<K, V> res = Query(qry, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -1105,7 +1105,7 @@ namespace ignite
              * @param err Error.
              * @return Query cursor.
              */
-            query::QueryCursor<K, V> Query(const query::TextQuery& qry, GridError& err)
+            query::QueryCursor<K, V> Query(const query::TextQuery& qry, IgniteError& err)
             {
                 impl::cache::query::QueryCursorImpl* cursorImpl = impl.Get()->QueryText(qry, &err);
 
@@ -1120,11 +1120,11 @@ namespace ignite
              */
             query::QueryCursor<K, V> Query(const query::ScanQuery& qry)
             {
-                GridError err;
+                IgniteError err;
 
                 query::QueryCursor<K, V> res = Query(qry, err);
 
-                GridError::ThrowIfNeeded(err);
+                IgniteError::ThrowIfNeeded(err);
 
                 return res;
             }
@@ -1136,7 +1136,7 @@ namespace ignite
              * @param err Error.
              * @return Query cursor.
              */
-            query::QueryCursor<K, V> Query(const query::ScanQuery& qry, GridError& err)
+            query::QueryCursor<K, V> Query(const query::ScanQuery& qry, IgniteError& err)
             {
                 impl::cache::query::QueryCursorImpl* cursorImpl = impl.Get()->QueryScan(qry, &err);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/cache/query/query_cursor.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/cache/query/query_cursor.h b/modules/platform/src/main/cpp/core/include/ignite/cache/query/query_cursor.h
index 7860676..23133e1 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/cache/query/query_cursor.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/cache/query/query_cursor.h
@@ -23,7 +23,7 @@
 #include <ignite/common/concurrent.h>
 
 #include "ignite/cache/cache_entry.h"
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 #include "ignite/impl/cache/query/query_impl.h"
 #include "ignite/impl/operations.h"
 
@@ -66,11 +66,11 @@ namespace ignite
                  */
                 bool HasNext()
                 {
-                    GridError err;
+                    IgniteError err;
 
                     bool res = HasNext(err);
 
-                    GridError::ThrowIfNeeded(err);
+                    IgniteError::ThrowIfNeeded(err);
 
                     return res;
                 }
@@ -81,7 +81,7 @@ namespace ignite
                  * @param err Error.
                  * @return True if next entry exists.
                  */
-                bool HasNext(GridError& err)
+                bool HasNext(IgniteError& err)
                 {
                     impl::cache::query::QueryCursorImpl* impl0 = impl.Get();
 
@@ -89,7 +89,7 @@ namespace ignite
                         return impl0->HasNext(&err);
                     else
                     {
-                        err = GridError(GridError::IGNITE_ERR_GENERIC, 
+                        err = IgniteError(IgniteError::IGNITE_ERR_GENERIC, 
                             "Instance is not usable (did you check for error?).");
 
                         return false;
@@ -103,11 +103,11 @@ namespace ignite
                  */
                 CacheEntry<K, V> GetNext()
                 {
-                    GridError err;
+                    IgniteError err;
 
                     CacheEntry<K, V> res = GetNext(err);
 
-                    GridError::ThrowIfNeeded(err);
+                    IgniteError::ThrowIfNeeded(err);
 
                     return res;                        
                 }
@@ -118,7 +118,7 @@ namespace ignite
                  * @param err Error.
                  * @return Next entry.
                  */
-                CacheEntry<K, V> GetNext(GridError& err)
+                CacheEntry<K, V> GetNext(IgniteError& err)
                 {
                     impl::cache::query::QueryCursorImpl* impl0 = impl.Get();
 
@@ -127,7 +127,7 @@ namespace ignite
 
                         impl0->GetNext(outOp, &err);
 
-                        if (err.GetCode() == GridError::IGNITE_SUCCESS) 
+                        if (err.GetCode() == IgniteError::IGNITE_SUCCESS) 
                         {
                             K& key = outOp.Get1();
                             V& val = outOp.Get2();
@@ -139,7 +139,7 @@ namespace ignite
                     }
                     else
                     {
-                        err = GridError(GridError::IGNITE_ERR_GENERIC,
+                        err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                             "Instance is not usable (did you check for error?).");
 
                         return CacheEntry<K, V>();
@@ -153,11 +153,11 @@ namespace ignite
                  */
                 void GetAll(std::vector<CacheEntry<K, V>>& res)
                 {
-                    GridError err;
+                    IgniteError err;
 
                     GetAll(res, err);
 
-                    GridError::ThrowIfNeeded(err);
+                    IgniteError::ThrowIfNeeded(err);
                 }
 
                 /**
@@ -166,7 +166,7 @@ namespace ignite
                  * @param Vector where query entries will be stored.
                  * @param err Error.                 
                  */
-                void GetAll(std::vector<CacheEntry<K, V>>& res, GridError& err)
+                void GetAll(std::vector<CacheEntry<K, V>>& res, IgniteError& err)
                 {
                     impl::cache::query::QueryCursorImpl* impl0 = impl.Get();
 
@@ -176,7 +176,7 @@ namespace ignite
                         impl0->GetAll(outOp, &err);
                     }
                     else
-                        err = GridError(GridError::IGNITE_ERR_GENERIC,
+                        err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                             "Instance is not usable (did you check for error?).");
                 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/grid.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/grid.h b/modules/platform/src/main/cpp/core/include/ignite/grid.h
index e388467..4d24832 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/grid.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/grid.h
@@ -56,11 +56,11 @@ namespace ignite
         template<typename K, typename V>
         cache::Cache<K, V> GetCache(const char* name)
         {
-            GridError err;
+            IgniteError err;
 
             cache::Cache<K, V> res = GetCache<K, V>(name, &err);
 
-            GridError::ThrowIfNeeded(err);
+            IgniteError::ThrowIfNeeded(err);
 
             return res;
         }
@@ -73,7 +73,7 @@ namespace ignite
          * @return Cache.
          */
         template<typename K, typename V>
-        cache::Cache<K, V> GetCache(const char* name, GridError* err)
+        cache::Cache<K, V> GetCache(const char* name, IgniteError* err)
         {
             impl::cache::CacheImpl* cacheImpl = impl.Get()->GetCache<K, V>(name, err);
 
@@ -89,11 +89,11 @@ namespace ignite
         template<typename K, typename V>
         cache::Cache<K, V> GetOrCreateCache(const char* name)
         {
-            GridError err;
+            IgniteError err;
 
             cache::Cache<K, V> res = GetOrCreateCache<K, V>(name, &err);
 
-            GridError::ThrowIfNeeded(err);
+            IgniteError::ThrowIfNeeded(err);
 
             return res;
         }
@@ -106,7 +106,7 @@ namespace ignite
          * @return Cache.
          */
         template<typename K, typename V>
-        cache::Cache<K, V> GetOrCreateCache(const char* name, GridError* err)
+        cache::Cache<K, V> GetOrCreateCache(const char* name, IgniteError* err)
         {
             impl::cache::CacheImpl* cacheImpl = impl.Get()->GetOrCreateCache<K, V>(name, err);
 
@@ -122,11 +122,11 @@ namespace ignite
         template<typename K, typename V>
         cache::Cache<K, V> CreateCache(const char* name)
         {
-            GridError err;
+            IgniteError err;
 
             cache::Cache<K, V> res = CreateCache<K, V>(name, &err);
 
-            GridError::ThrowIfNeeded(err);
+            IgniteError::ThrowIfNeeded(err);
 
             return res;
         }
@@ -139,7 +139,7 @@ namespace ignite
          * @return Cache.
          */
         template<typename K, typename V>
-        cache::Cache<K, V> CreateCache(const char* name, GridError* err)
+        cache::Cache<K, V> CreateCache(const char* name, IgniteError* err)
         {
             impl::cache::CacheImpl* cacheImpl = impl.Get()->CreateCache<K, V>(name, err);
 


[2/3] ignite git commit: IGNITE-1364: GridError -> IgniteError.

Posted by vo...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/grid_error.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/grid_error.h b/modules/platform/src/main/cpp/core/include/ignite/grid_error.h
deleted file mode 100644
index 7b1dd8e..0000000
--- a/modules/platform/src/main/cpp/core/include/ignite/grid_error.h
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _IGNITE_GRID_ERROR
-#define _IGNITE_GRID_ERROR
-
-#include <sstream>
-#include <stdint.h>
-
-#include <ignite/common/common.h>
-
-#define IGNITE_ERROR_1(code, part1) { \
-    std::stringstream stream; \
-    stream << (part1); \
-    throw ignite::GridError(code, stream.str().c_str()); \
-}
-
-#define IGNITE_ERROR_2(code, part1, part2) { \
-    std::stringstream stream; \
-    stream << (part1) << (part2); \
-    throw ignite::GridError(code, stream.str().c_str()); \
-}
-
-#define IGNITE_ERROR_3(code, part1, part2, part3) { \
-    std::stringstream stream; \
-    stream << (part1) << (part2) << (part3); \
-    throw ignite::GridError(code, stream.str().c_str()); \
-}
-
-#define IGNITE_ERROR_FORMATTED_1(code, msg, key1, val1) { \
-    std::stringstream stream; \
-    stream << msg << " [" << key1 << "=" << (val1) << "]"; \
-    throw ignite::GridError(code, stream.str().c_str()); \
-}
-
-#define IGNITE_ERROR_FORMATTED_2(code, msg, key1, val1, key2, val2) { \
-    std::stringstream stream; \
-    stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << "]"; \
-    throw ignite::GridError(code, stream.str().c_str()); \
-}
-
-#define IGNITE_ERROR_FORMATTED_3(code, msg, key1, val1, key2, val2, key3, val3) { \
-    std::stringstream stream; \
-    stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << "]"; \
-    throw ignite::GridError(code, stream.str().c_str()); \
-}
-
-#define IGNITE_ERROR_FORMATTED_4(code, msg, key1, val1, key2, val2, key3, val3, key4, val4) { \
-    std::stringstream stream; \
-    stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << ", " << key4 << "=" << (val4) << "]"; \
-    throw ignite::GridError(code, stream.str().c_str()); \
-}
-
-namespace ignite
-{
-    /**
-     * Grid error information.
-     */
-    class IGNITE_IMPORT_EXPORT GridError
-    {
-    public:
-        /** Success. */
-        static const int IGNITE_SUCCESS = 0;
-
-        /** Failed to initialize JVM. */
-        static const int IGNITE_ERR_JVM_INIT = 1;
-
-        /** Failed to attach to JVM. */
-        static const int IGNITE_ERR_JVM_ATTACH = 2;
-        
-        /** JVM library is not found. */
-        static const int IGNITE_ERR_JVM_LIB_NOT_FOUND = 3;
-
-        /** Failed to load JVM library. */
-        static const int IGNITE_ERR_JVM_LIB_LOAD_FAILED = 4;
-        
-        /** JVM classpath is not provided. */
-        static const int IGNITE_ERR_JVM_NO_CLASSPATH = 5;
-
-        /** JVM error: no class definition found. */
-        static const int IGNITE_ERR_JVM_NO_CLASS_DEF_FOUND = 6;
-
-        /** JVM error: no such method. */
-        static const int IGNITE_ERR_JVM_NO_SUCH_METHOD = 7;
-
-        /** Memory operation error. */
-        static const int IGNITE_ERR_MEMORY = 1001;
-
-        /** Portable error. */
-        static const int IGNITE_ERR_PORTABLE = 1002;
-
-        /** Generic Ignite error. */
-        static const int IGNITE_ERR_GENERIC = 2000;
-
-        /** Illegal argument passed. */
-        static const int IGNITE_ERR_ILLEGAL_ARGUMENT = 2001;
-
-        /** Illegal state. */
-        static const int IGNITE_ERR_ILLEGAL_STATE = 2002;
-
-        /** Unsupported operation. */
-        static const int IGNITE_ERR_UNSUPPORTED_OPERATION = 2003;
-
-        /** Thread has been interrup. */
-        static const int IGNITE_ERR_INTERRUPTED = 2004;
-
-        /** Cluster group is empty. */
-        static const int IGNITE_ERR_CLUSTER_GROUP_EMPTY = 2005;
-
-        /** Cluster topology problem. */
-        static const int IGNITE_ERR_CLUSTER_TOPOLOGY = 2006;
-
-        /** Compute execution rejected. */
-        static const int IGNITE_ERR_COMPUTE_EXECUTION_REJECTED = 2007;
-
-        /** Compute job failover. */
-        static const int IGNITE_ERR_COMPUTE_JOB_FAILOVER = 2008;
-
-        /** Compute task cancelled. */
-        static const int IGNITE_ERR_COMPUTE_TASK_CANCELLED = 2009;
-
-        /** Compute task timeout. */
-        static const int IGNITE_ERR_COMPUTE_TASK_TIMEOUT = 2010;
-
-        /** Compute user undeclared exception. */
-        static const int IGNITE_ERR_COMPUTE_USER_UNDECLARED_EXCEPTION = 2011;
-
-        /** Generic cache error. */
-        static const int IGNITE_ERR_CACHE = 2012;
-
-        /** Generic cache loader error. */
-        static const int IGNITE_ERR_CACHE_LOADER = 2013;
-
-        /** Generic cache writer error. */
-        static const int IGNITE_ERR_CACHE_WRITER = 2014;
-        
-        /** Generic cache entry processor error. */
-        static const int IGNITE_ERR_ENTRY_PROCESSOR = 2015;
-
-        /** Cache atomic update timeout. */
-        static const int IGNITE_ERR_CACHE_ATOMIC_UPDATE_TIMEOUT = 2016;
-
-        /** Cache partial update. */
-        static const int IGNITE_ERR_CACHE_PARTIAL_UPDATE = 2017;
-        
-        /** Transaction optimisitc exception. */
-        static const int IGNITE_ERR_TX_OPTIMISTIC = 2018;
-
-        /** Transaction timeout. */
-        static const int IGNITE_ERR_TX_TIMEOUT = 2019;
-
-        /** Transaction rollback. */
-        static const int IGNITE_ERR_TX_ROLLBACK = 2020;
-
-        /** Transaction heuristic exception. */
-        static const int IGNITE_ERR_TX_HEURISTIC = 2021;
-
-        /** Authentication error. */
-        static const int IGNITE_ERR_AUTHENTICATION = 2022;
-
-        /** Security error. */
-        static const int IGNITE_ERR_SECURITY = 2023;
-        
-        /** Unknown error. */
-        static const int IGNITE_ERR_UNKNOWN = -1;
-
-        /**
-         * Throw an error if code is not IGNITE_SUCCESS.
-         *
-         * @param err Error.
-         */
-        static void ThrowIfNeeded(GridError& err);
-
-        /**
-         * Create empty error.
-         */
-        GridError();
-
-        /**
-         * Create error with specific code.
-         *
-         * @param code Error code.
-         */
-        GridError(const int32_t code);
-
-        /**
-         * Create error with specific code and message.
-         *
-         * @param code Error code.
-         * @param msg Message.
-         */
-        GridError(const int32_t code, const char* msg);
-        
-        /**
-         * Copy constructor.
-         *
-         * @param other Other instance.
-         */
-        GridError(const GridError& other);
-
-        /**
-         * Assignment operator.
-         *
-         * @param other Other instance.
-         * @return Assignment result.
-         */
-        GridError& operator=(const GridError& other);
-
-        /**
-         * Destructor.
-         */
-        ~GridError();
-
-        /**
-         * Get error code.
-         *
-         * @return Error code.
-         */
-        int32_t GetCode();
-
-        /**
-         * Get error message.
-         *
-         * @return Error message.
-         */
-        const char* GetText();
-        
-        /**
-         * Set error.
-         *
-         * @param jniCode Error code.
-         * @param jniCls Error class.
-         * @param jniMsg Error message.
-         * @param err Error.
-         */
-        static void SetError(const int jniCode, const char* jniCls, const char* jniMsg, GridError* err);
-    private:
-        /** Error code. */
-        int32_t code;    
-        
-        /** Error message. */
-        char* msg;       
-    };    
-}
-
-#endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/grid_factory.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/grid_factory.h b/modules/platform/src/main/cpp/core/include/ignite/grid_factory.h
index 5ed9c16..0c8fc25 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/grid_factory.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/grid_factory.h
@@ -61,7 +61,7 @@
 
 #include "ignite/grid.h"
 #include "ignite/grid_configuration.h"
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 
 namespace ignite
 {
@@ -86,7 +86,7 @@ namespace ignite
          * @param err Error.
          * @return Grid instance or null in case of error.
          */
-        static Grid Start(const GridConfiguration& cfg, GridError* err);
+        static Grid Start(const GridConfiguration& cfg, IgniteError* err);
 
         /**
          * Start grid instance with specific name.
@@ -105,7 +105,7 @@ namespace ignite
          * @param err Error.
          * @return Grid instance or null in case of error.
          */
-        static Grid Start(const GridConfiguration& cfg, const char* name, GridError* err);
+        static Grid Start(const GridConfiguration& cfg, const char* name, IgniteError* err);
 
         /**
          * Get default grid instance.
@@ -120,7 +120,7 @@ namespace ignite
          * @param err Error.
          * @return Grid instance.
          */
-        static Grid Get(GridError* err);
+        static Grid Get(IgniteError* err);
 
         /**
          * Get grid instance with the given name.
@@ -137,7 +137,7 @@ namespace ignite
          * @param err Error.
          * @return Grid instance.
          */
-        static Grid Get(const char* name, GridError* err);
+        static Grid Get(const char* name, IgniteError* err);
 
         /**
          * Stop default grid instance.
@@ -154,7 +154,7 @@ namespace ignite
          * @param err Error.
          * @return True if grid instance was stopped by this call.
          */
-        static bool Stop(const bool cancel, GridError* err);
+        static bool Stop(const bool cancel, IgniteError* err);
 
         /**
          * Stop grid instance with the given name.
@@ -173,7 +173,7 @@ namespace ignite
          * @param err Error.
          * @return True if grid instance was stopped by this call.
          */
-        static bool Stop(const char* name, const bool cancel, GridError* err);
+        static bool Stop(const char* name, const bool cancel, IgniteError* err);
 
         /**
          * Stop all running grid instances.
@@ -188,7 +188,7 @@ namespace ignite
          * @param cancel Cancel flag.
          * @param err Error.
          */
-        static void StopAll(const bool cancel, GridError* err);
+        static void StopAll(const bool cancel, IgniteError* err);
     };    
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h b/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h
new file mode 100644
index 0000000..eb95adc
--- /dev/null
+++ b/modules/platform/src/main/cpp/core/include/ignite/ignite_error.h
@@ -0,0 +1,260 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _IGNITE_ERROR
+#define _IGNITE_ERROR
+
+#include <sstream>
+#include <stdint.h>
+
+#include <ignite/common/common.h>
+
+#define IGNITE_ERROR_1(code, part1) { \
+    std::stringstream stream; \
+    stream << (part1); \
+    throw ignite::IgniteError(code, stream.str().c_str()); \
+}
+
+#define IGNITE_ERROR_2(code, part1, part2) { \
+    std::stringstream stream; \
+    stream << (part1) << (part2); \
+    throw ignite::IgniteError(code, stream.str().c_str()); \
+}
+
+#define IGNITE_ERROR_3(code, part1, part2, part3) { \
+    std::stringstream stream; \
+    stream << (part1) << (part2) << (part3); \
+    throw ignite::IgniteError(code, stream.str().c_str()); \
+}
+
+#define IGNITE_ERROR_FORMATTED_1(code, msg, key1, val1) { \
+    std::stringstream stream; \
+    stream << msg << " [" << key1 << "=" << (val1) << "]"; \
+    throw ignite::IgniteError(code, stream.str().c_str()); \
+}
+
+#define IGNITE_ERROR_FORMATTED_2(code, msg, key1, val1, key2, val2) { \
+    std::stringstream stream; \
+    stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << "]"; \
+    throw ignite::IgniteError(code, stream.str().c_str()); \
+}
+
+#define IGNITE_ERROR_FORMATTED_3(code, msg, key1, val1, key2, val2, key3, val3) { \
+    std::stringstream stream; \
+    stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << "]"; \
+    throw ignite::IgniteError(code, stream.str().c_str()); \
+}
+
+#define IGNITE_ERROR_FORMATTED_4(code, msg, key1, val1, key2, val2, key3, val3, key4, val4) { \
+    std::stringstream stream; \
+    stream << msg << " [" << key1 << "=" << (val1) << ", " << key2 << "=" << (val2) << ", " << key3 << "=" << (val3) << ", " << key4 << "=" << (val4) << "]"; \
+    throw ignite::IgniteError(code, stream.str().c_str()); \
+}
+
+namespace ignite
+{
+    /**
+     * Grid error information.
+     */
+    class IGNITE_IMPORT_EXPORT IgniteError
+    {
+    public:
+        /** Success. */
+        static const int IGNITE_SUCCESS = 0;
+
+        /** Failed to initialize JVM. */
+        static const int IGNITE_ERR_JVM_INIT = 1;
+
+        /** Failed to attach to JVM. */
+        static const int IGNITE_ERR_JVM_ATTACH = 2;
+        
+        /** JVM library is not found. */
+        static const int IGNITE_ERR_JVM_LIB_NOT_FOUND = 3;
+
+        /** Failed to load JVM library. */
+        static const int IGNITE_ERR_JVM_LIB_LOAD_FAILED = 4;
+        
+        /** JVM classpath is not provided. */
+        static const int IGNITE_ERR_JVM_NO_CLASSPATH = 5;
+
+        /** JVM error: no class definition found. */
+        static const int IGNITE_ERR_JVM_NO_CLASS_DEF_FOUND = 6;
+
+        /** JVM error: no such method. */
+        static const int IGNITE_ERR_JVM_NO_SUCH_METHOD = 7;
+
+        /** Memory operation error. */
+        static const int IGNITE_ERR_MEMORY = 1001;
+
+        /** Portable error. */
+        static const int IGNITE_ERR_PORTABLE = 1002;
+
+        /** Generic Ignite error. */
+        static const int IGNITE_ERR_GENERIC = 2000;
+
+        /** Illegal argument passed. */
+        static const int IGNITE_ERR_ILLEGAL_ARGUMENT = 2001;
+
+        /** Illegal state. */
+        static const int IGNITE_ERR_ILLEGAL_STATE = 2002;
+
+        /** Unsupported operation. */
+        static const int IGNITE_ERR_UNSUPPORTED_OPERATION = 2003;
+
+        /** Thread has been interrup. */
+        static const int IGNITE_ERR_INTERRUPTED = 2004;
+
+        /** Cluster group is empty. */
+        static const int IGNITE_ERR_CLUSTER_GROUP_EMPTY = 2005;
+
+        /** Cluster topology problem. */
+        static const int IGNITE_ERR_CLUSTER_TOPOLOGY = 2006;
+
+        /** Compute execution rejected. */
+        static const int IGNITE_ERR_COMPUTE_EXECUTION_REJECTED = 2007;
+
+        /** Compute job failover. */
+        static const int IGNITE_ERR_COMPUTE_JOB_FAILOVER = 2008;
+
+        /** Compute task cancelled. */
+        static const int IGNITE_ERR_COMPUTE_TASK_CANCELLED = 2009;
+
+        /** Compute task timeout. */
+        static const int IGNITE_ERR_COMPUTE_TASK_TIMEOUT = 2010;
+
+        /** Compute user undeclared exception. */
+        static const int IGNITE_ERR_COMPUTE_USER_UNDECLARED_EXCEPTION = 2011;
+
+        /** Generic cache error. */
+        static const int IGNITE_ERR_CACHE = 2012;
+
+        /** Generic cache loader error. */
+        static const int IGNITE_ERR_CACHE_LOADER = 2013;
+
+        /** Generic cache writer error. */
+        static const int IGNITE_ERR_CACHE_WRITER = 2014;
+        
+        /** Generic cache entry processor error. */
+        static const int IGNITE_ERR_ENTRY_PROCESSOR = 2015;
+
+        /** Cache atomic update timeout. */
+        static const int IGNITE_ERR_CACHE_ATOMIC_UPDATE_TIMEOUT = 2016;
+
+        /** Cache partial update. */
+        static const int IGNITE_ERR_CACHE_PARTIAL_UPDATE = 2017;
+        
+        /** Transaction optimisitc exception. */
+        static const int IGNITE_ERR_TX_OPTIMISTIC = 2018;
+
+        /** Transaction timeout. */
+        static const int IGNITE_ERR_TX_TIMEOUT = 2019;
+
+        /** Transaction rollback. */
+        static const int IGNITE_ERR_TX_ROLLBACK = 2020;
+
+        /** Transaction heuristic exception. */
+        static const int IGNITE_ERR_TX_HEURISTIC = 2021;
+
+        /** Authentication error. */
+        static const int IGNITE_ERR_AUTHENTICATION = 2022;
+
+        /** Security error. */
+        static const int IGNITE_ERR_SECURITY = 2023;
+        
+        /** Unknown error. */
+        static const int IGNITE_ERR_UNKNOWN = -1;
+
+        /**
+         * Throw an error if code is not IGNITE_SUCCESS.
+         *
+         * @param err Error.
+         */
+        static void ThrowIfNeeded(IgniteError& err);
+
+        /**
+         * Create empty error.
+         */
+        IgniteError();
+
+        /**
+         * Create error with specific code.
+         *
+         * @param code Error code.
+         */
+        IgniteError(const int32_t code);
+
+        /**
+         * Create error with specific code and message.
+         *
+         * @param code Error code.
+         * @param msg Message.
+         */
+        IgniteError(const int32_t code, const char* msg);
+        
+        /**
+         * Copy constructor.
+         *
+         * @param other Other instance.
+         */
+        IgniteError(const IgniteError& other);
+
+        /**
+         * Assignment operator.
+         *
+         * @param other Other instance.
+         * @return Assignment result.
+         */
+        IgniteError& operator=(const IgniteError& other);
+
+        /**
+         * Destructor.
+         */
+        ~IgniteError();
+
+        /**
+         * Get error code.
+         *
+         * @return Error code.
+         */
+        int32_t GetCode();
+
+        /**
+         * Get error message.
+         *
+         * @return Error message.
+         */
+        const char* GetText();
+        
+        /**
+         * Set error.
+         *
+         * @param jniCode Error code.
+         * @param jniCls Error class.
+         * @param jniMsg Error message.
+         * @param err Error.
+         */
+        static void SetError(const int jniCode, const char* jniCls, const char* jniMsg, IgniteError* err);
+    private:
+        /** Error code. */
+        int32_t code;    
+        
+        /** Error message. */
+        char* msg;       
+    };    
+}
+
+#endif
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/impl/cache/cache_impl.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/cache/cache_impl.h b/modules/platform/src/main/cpp/core/include/ignite/impl/cache/cache_impl.h
index 7862957..c797c29 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/cache/cache_impl.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/cache/cache_impl.h
@@ -64,7 +64,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result.
                  */
-                bool IsEmpty(GridError* err);
+                bool IsEmpty(IgniteError* err);
 
                 /**
                  * Perform ContainsKey.
@@ -73,7 +73,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result.
                  */
-                bool ContainsKey(InputOperation& inOp, GridError* err);
+                bool ContainsKey(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform ContainsKeys.
@@ -82,7 +82,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result.
                  */
-                bool ContainsKeys(InputOperation& inOp, GridError* err);
+                bool ContainsKeys(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform LocalPeek.
@@ -93,7 +93,7 @@ namespace ignite
                  * @param err Error.
                  */
                 void LocalPeek(InputOperation& inOp, OutputOperation& outOp, 
-                    int32_t peekModes, GridError* err);
+                    int32_t peekModes, IgniteError* err);
 
                 /**
                  * Perform Get.
@@ -102,7 +102,7 @@ namespace ignite
                  * @param outOp Output.
                  * @param err Error.
                  */
-                void Get(InputOperation& inOp, OutputOperation& outOp, GridError* err);
+                void Get(InputOperation& inOp, OutputOperation& outOp, IgniteError* err);
                 
                 /**
                  * Perform GetAll.
@@ -111,7 +111,7 @@ namespace ignite
                  * @param outOp Output.
                  * @param err Error.
                  */
-                void GetAll(InputOperation& inOp, OutputOperation& outOp, GridError* err);
+                void GetAll(InputOperation& inOp, OutputOperation& outOp, IgniteError* err);
 
                 /**
                  * Perform Put.
@@ -119,7 +119,7 @@ namespace ignite
                  * @param inOp Input.
                  * @param err Error.
                  */
-                void Put(InputOperation& inOp, GridError* err);
+                void Put(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform PutAll.
@@ -127,7 +127,7 @@ namespace ignite
                  * @param inOp Input.
                  * @param err Error.
                  */
-                void PutAll(InputOperation& inOp, GridError* err);
+                void PutAll(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform GetAndPut.
@@ -136,7 +136,7 @@ namespace ignite
                  * @param outOp Output.
                  * @param err Error.
                  */
-                void GetAndPut(InputOperation& inOp, OutputOperation& outOp, GridError* err);
+                void GetAndPut(InputOperation& inOp, OutputOperation& outOp, IgniteError* err);
 
                 /**
                  * Perform GetAndReplace.
@@ -145,7 +145,7 @@ namespace ignite
                  * @param outOp Output.
                  * @param err Error.
                  */
-                void GetAndReplace(InputOperation& inOp, OutputOperation& outOp, GridError* err);
+                void GetAndReplace(InputOperation& inOp, OutputOperation& outOp, IgniteError* err);
 
                 /**
                  * Perform GetAndRemove.
@@ -154,7 +154,7 @@ namespace ignite
                  * @param outOp Output.
                  * @param err Error.
                  */
-                void GetAndRemove(InputOperation& inOp, OutputOperation& outOp, GridError* err);
+                void GetAndRemove(InputOperation& inOp, OutputOperation& outOp, IgniteError* err);
 
                 /**
                  * Perform PutIfAbsent.
@@ -163,7 +163,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result
                  */
-                bool PutIfAbsent(InputOperation& inOp, GridError* err);
+                bool PutIfAbsent(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform GetAndPutIfAbsent.
@@ -172,7 +172,7 @@ namespace ignite
                  * @param outOp Output.
                  * @param err Error.
                  */
-                void GetAndPutIfAbsent(InputOperation& inOp, OutputOperation& outOp, GridError* err);
+                void GetAndPutIfAbsent(InputOperation& inOp, OutputOperation& outOp, IgniteError* err);
 
                 /**
                  * Perform Replace(K, V).
@@ -181,7 +181,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result
                  */
-                bool Replace(InputOperation& inOp, GridError* err);
+                bool Replace(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform Replace(K, V, V).
@@ -190,7 +190,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result
                  */
-                bool ReplaceIfEqual(InputOperation& inOp, GridError* err);
+                bool ReplaceIfEqual(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform LocalEvict.
@@ -198,14 +198,14 @@ namespace ignite
                  * @param inOp Input.
                  * @param err Error.
                  */
-                void LocalEvict(InputOperation& inOp, GridError* err);
+                void LocalEvict(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform Clear.
                  *
                  * @param err Error.
                  */
-                void Clear(GridError* err);
+                void Clear(IgniteError* err);
 
                 /**
                  * Perform Clear.
@@ -213,7 +213,7 @@ namespace ignite
                  * @param inOp Input.
                  * @param err Error.
                  */
-                void Clear(InputOperation& inOp, GridError* err);
+                void Clear(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform ClearAll.
@@ -221,7 +221,7 @@ namespace ignite
                  * @param inOp Input.
                  * @param err Error.
                  */
-                void ClearAll(InputOperation& inOp, GridError* err);
+                void ClearAll(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform LocalClear.
@@ -229,7 +229,7 @@ namespace ignite
                  * @param inOp Input.
                  * @param err Error.
                  */
-                void LocalClear(InputOperation& inOp, GridError* err);
+                void LocalClear(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform LocalClearAll.
@@ -237,7 +237,7 @@ namespace ignite
                  * @param inOp Input.
                  * @param err Error.
                  */
-                void LocalClearAll(InputOperation& inOp, GridError* err);
+                void LocalClearAll(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform Remove(K).
@@ -246,7 +246,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result
                  */
-                bool Remove(InputOperation& inOp, GridError* err);
+                bool Remove(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform Remove(K, V).
@@ -255,7 +255,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result
                  */
-                bool RemoveIfEqual(InputOperation& inOp, GridError* err);
+                bool RemoveIfEqual(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform RemoveAll.
@@ -263,14 +263,14 @@ namespace ignite
                  * @param inOp Input.
                  * @param err Error.
                  */
-                void RemoveAll(InputOperation& inOp, GridError* err);
+                void RemoveAll(InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Perform RemoveAll.
                  *
                  * @param err Error.
                  */
-                void RemoveAll(GridError* err);
+                void RemoveAll(IgniteError* err);
 
                 /**
                  * Perform Size.
@@ -279,7 +279,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result.
                  */
-                int32_t Size(const int32_t peekModes, GridError* err);
+                int32_t Size(const int32_t peekModes, IgniteError* err);
 
                 /**
                  * Perform LocalSize.
@@ -288,7 +288,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result.
                  */
-                int32_t LocalSize(const int32_t peekModes, GridError* err);
+                int32_t LocalSize(const int32_t peekModes, IgniteError* err);
 
                 /**
                  * Invoke query.
@@ -297,7 +297,7 @@ namespace ignite
                  * @param err Error.
                  * @return Query cursor.
                  */
-                query::QueryCursorImpl* QuerySql(const ignite::cache::query::SqlQuery& qry, GridError* err);
+                query::QueryCursorImpl* QuerySql(const ignite::cache::query::SqlQuery& qry, IgniteError* err);
 
                 /*
                  * Invoke text query.
@@ -306,7 +306,7 @@ namespace ignite
                  * @param err Error.
                  * @return Query cursor.
                  */
-                query::QueryCursorImpl* QueryText(const ignite::cache::query::TextQuery& qry, GridError* err);
+                query::QueryCursorImpl* QueryText(const ignite::cache::query::TextQuery& qry, IgniteError* err);
 
                 /*
                  * Invoke scan query.
@@ -315,7 +315,7 @@ namespace ignite
                  * @param err Error.
                  * @return Query cursor.
                  */
-                query::QueryCursorImpl* QueryScan(const ignite::cache::query::ScanQuery& qry, GridError* err);
+                query::QueryCursorImpl* QueryScan(const ignite::cache::query::ScanQuery& qry, IgniteError* err);
                 
             private:
                 /** Name. */
@@ -337,7 +337,7 @@ namespace ignite
                  * @param err Error.
                  * @return Memory pointer.
                  */
-                int64_t WriteTo(interop::InteropMemory* mem, InputOperation& inOp, GridError* err);
+                int64_t WriteTo(interop::InteropMemory* mem, InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Read data from memory.
@@ -355,7 +355,7 @@ namespace ignite
                  * @param err Error.
                  * @return Size.
                  */
-                int SizeInternal(const int32_t peekModes, const bool loc, GridError* err);
+                int SizeInternal(const int32_t peekModes, const bool loc, IgniteError* err);
 
                 /**
                  * Internal out operation.
@@ -365,7 +365,7 @@ namespace ignite
                  * @param err Error.
                  * @return Result.
                  */
-                bool OutOpInternal(const int32_t opType, InputOperation& inOp, GridError* err);
+                bool OutOpInternal(const int32_t opType, InputOperation& inOp, IgniteError* err);
 
                 /**
                  * Internal out-in operation.
@@ -376,7 +376,7 @@ namespace ignite
                  * @param err Error.
                  */
                 void OutInOpInternal(const int32_t opType, InputOperation& inOp, OutputOperation& outOp, 
-                    GridError* err);
+                    IgniteError* err);
 
                 /**
                  * Internal query execution routine.
@@ -386,7 +386,7 @@ namespace ignite
                  * @param err Error.
                  */
                 template<typename T>
-                query::QueryCursorImpl* QueryInternal(const T& qry, int32_t typ, GridError* err)
+                query::QueryCursorImpl* QueryInternal(const T& qry, int32_t typ, IgniteError* err)
                 {
                     ignite::common::java::JniErrorInfo jniErr;
 
@@ -403,7 +403,7 @@ namespace ignite
                     jobject qryJavaRef = env.Get()->Context()->CacheOutOpQueryCursor(javaRef, typ, mem.Get()->PointerLong(), 
                         &jniErr);
 
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                     if (jniErr.code == ignite::common::java::IGNITE_JNI_ERR_SUCCESS)
                         return new query::QueryCursorImpl(env, qryJavaRef);

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/impl/cache/query/query_impl.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/cache/query/query_impl.h b/modules/platform/src/main/cpp/core/include/ignite/impl/cache/query/query_impl.h
index a394383..58c6255 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/cache/query/query_impl.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/cache/query/query_impl.h
@@ -18,7 +18,7 @@
 #ifndef _IGNITE_CACHE_QUERY_IMPL
 #define _IGNITE_CACHE_QUERY_IMPL
 
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 #include "ignite/impl/grid_environment.h"
 #include "ignite/impl/operations.h"
 
@@ -55,7 +55,7 @@ namespace ignite
                      * @param err Error.
                      * @return True if exists.
                      */
-                    bool HasNext(GridError* err);
+                    bool HasNext(IgniteError* err);
 
                     /**
                      * Get next object.
@@ -63,7 +63,7 @@ namespace ignite
                      * @param op Operation.
                      * @param err Error.
                      */
-                    void GetNext(OutputOperation& op, GridError* err);
+                    void GetNext(OutputOperation& op, IgniteError* err);
 
                     /**
                      * Get all cursor entries.
@@ -71,7 +71,7 @@ namespace ignite
                      * @param op Operation.
                      * @param err Error.
                      */
-                    void GetAll(OutputOperation& op, GridError* err);
+                    void GetAll(OutputOperation& op, IgniteError* err);
 
                 private:
                     /** Environment. */
@@ -97,7 +97,7 @@ namespace ignite
                      * @param err Error.
                      * @return True in case of success, false if an error is thrown.
                      */
-                    bool CreateIteratorIfNeeded(GridError* err);
+                    bool CreateIteratorIfNeeded(IgniteError* err);
 
                     /**
                      * Check whether Java-side iterator has next element.
@@ -105,7 +105,7 @@ namespace ignite
                      * @param err Error.
                      * @return True if the next element is available.
                      */
-                    bool IteratorHasNext(GridError* err);
+                    bool IteratorHasNext(IgniteError* err);
                 };
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/impl/grid_impl.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/grid_impl.h b/modules/platform/src/main/cpp/core/include/ignite/impl/grid_impl.h
index c0ad106..0cbcc0a 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/grid_impl.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/grid_impl.h
@@ -63,7 +63,7 @@ namespace ignite
              * @param err Error.
              */
             template<typename K, typename V> 
-            cache::CacheImpl* GetCache(const char* name, GridError* err)
+            cache::CacheImpl* GetCache(const char* name, IgniteError* err)
             {
                 ignite::common::java::JniErrorInfo jniErr;
 
@@ -71,7 +71,7 @@ namespace ignite
 
                 if (!cacheJavaRef)
                 {
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                     return NULL;
                 }
@@ -88,7 +88,7 @@ namespace ignite
              * @param err Error.
              */
             template<typename K, typename V>
-            cache::CacheImpl* GetOrCreateCache(const char* name, GridError* err)
+            cache::CacheImpl* GetOrCreateCache(const char* name, IgniteError* err)
             {
                 ignite::common::java::JniErrorInfo jniErr;
 
@@ -96,7 +96,7 @@ namespace ignite
 
                 if (!cacheJavaRef)
                 {
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                     return NULL;
                 }
@@ -113,7 +113,7 @@ namespace ignite
              * @param err Error.
              */
             template<typename K, typename V>
-            cache::CacheImpl* CreateCache(const char* name, GridError* err)
+            cache::CacheImpl* CreateCache(const char* name, IgniteError* err)
             {
                 ignite::common::java::JniErrorInfo jniErr;
 
@@ -121,7 +121,7 @@ namespace ignite
 
                 if (!cacheJavaRef)
                 {
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
                     return NULL;
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_id_resolver.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_id_resolver.h b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_id_resolver.h
index e3c1955..d8f7883 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_id_resolver.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_id_resolver.h
@@ -90,7 +90,7 @@ namespace ignite
                 virtual int32_t GetFieldId(const int32_t typeId, const char* name) {
                     if (!name)
                     {
-                        IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Field name cannot be NULL.");
+                        IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Field name cannot be NULL.");
                     }
 
                     return type.GetFieldId(name);

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_manager.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_manager.h b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_manager.h
index eb2f445..3e2b770 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_manager.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_manager.h
@@ -20,7 +20,7 @@
 
 #include <vector>
 
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 #include "ignite/impl/portable/portable_metadata_handler.h"
 #include "ignite/impl/portable/portable_metadata_updater.h"
 
@@ -84,7 +84,7 @@ namespace ignite
                  * @param err Error.
                  * @return In case of success.
                  */
-                bool ProcessPendingUpdates(PortableMetadataUpdater* updater, GridError* err);
+                bool ProcessPendingUpdates(PortableMetadataUpdater* updater, IgniteError* err);
 
             private:
                 /** Current snapshots. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater.h b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater.h
index bd53df6..a734db7 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater.h
@@ -18,7 +18,7 @@
 #ifndef _IGNITE_IMPL_PORTABLE_METADATA_UPDATER
 #define _IGNITE_IMPL_PORTABLE_METADATA_UPDATER
 
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 #include "ignite/impl/portable/portable_metadata_snapshot.h"
 
 namespace ignite
@@ -44,7 +44,7 @@ namespace ignite
                  * @param snapshot Snapshot.
                  * @param err Error.
                  */
-                virtual bool Update(Snap* snapshot, GridError* err) = 0;
+                virtual bool Update(Snap* snapshot, IgniteError* err) = 0;
             };
         }
     }    

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater_impl.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater_impl.h b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater_impl.h
index d03f34b..277cd83 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater_impl.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_metadata_updater_impl.h
@@ -48,7 +48,7 @@ namespace ignite
                  */
                 ~PortableMetadataUpdaterImpl();
 
-                bool Update(Snap* snapshot, GridError* err);
+                bool Update(Snap* snapshot, IgniteError* err);
             private:
                 /** Environment. */
                 ignite::common::concurrent::SharedPointer<GridEnvironment> env;

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_reader_impl.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_reader_impl.h b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_reader_impl.h
index 119332f..7d82aa2 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_reader_impl.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/impl/portable/portable_reader_impl.h
@@ -639,7 +639,7 @@ namespace ignite
                     if (hdr == IGNITE_HDR_NULL)
                         return GetNull<T>();
                     else if (hdr == IGNITE_HDR_HND) {
-                        IGNITE_ERROR_1(ignite::GridError::IGNITE_ERR_PORTABLE, "Circular references are not supported.");
+                        IGNITE_ERROR_1(ignite::IgniteError::IGNITE_ERR_PORTABLE, "Circular references are not supported.");
                     }
                     else if (hdr == IGNITE_TYPE_PORTABLE)
                     {
@@ -802,7 +802,7 @@ namespace ignite
                             {
                                 int32_t pos = stream->Position();
 
-                                IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid type ID", 
+                                IGNITE_ERROR_FORMATTED_3(IgniteError::IGNITE_ERR_PORTABLE, "Invalid type ID", 
                                     "position", pos, "expected", expHdr, "actual", typeId)
                             }
                         }
@@ -1031,7 +1031,7 @@ namespace ignite
                     else {
                         int32_t pos = stream->Position() - 1;
 
-                        IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", typeId)
+                        IGNITE_ERROR_FORMATTED_3(IgniteError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", typeId)
                     }
                 }
 
@@ -1054,7 +1054,7 @@ namespace ignite
                     else {
                         int32_t pos = stream->Position() - 1;
 
-                        IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", typeId)
+                        IGNITE_ERROR_FORMATTED_3(IgniteError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", expHdr, "actual", typeId)
                     }
                 }
             };
@@ -1120,7 +1120,7 @@ namespace ignite
                 else {
                     int32_t pos = stream->Position() - 1;
 
-                    IGNITE_ERROR_FORMATTED_3(GridError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", IGNITE_TYPE_STRING, "actual", typeId)
+                    IGNITE_ERROR_FORMATTED_3(IgniteError::IGNITE_ERR_PORTABLE, "Invalid header", "position", pos, "expected", IGNITE_TYPE_STRING, "actual", typeId)
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/include/ignite/portable/portable_type.h
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/include/ignite/portable/portable_type.h b/modules/platform/src/main/cpp/core/include/ignite/portable/portable_type.h
index ce5b2fa..fb086ef 100644
--- a/modules/platform/src/main/cpp/core/include/ignite/portable/portable_type.h
+++ b/modules/platform/src/main/cpp/core/include/ignite/portable/portable_type.h
@@ -22,7 +22,7 @@
 
 #include <ignite/common/common.h>
 
-#include "ignite/grid_error.h"
+#include "ignite/ignite_error.h"
 
 /**
  * Start portable type definition.
@@ -147,7 +147,7 @@ namespace ignite
              */
             int32_t GetTypeId()
             {
-                IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetTypeId function is not defined for portable type.");
+                IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "GetTypeId function is not defined for portable type.");
             }
 
             /**
@@ -157,7 +157,7 @@ namespace ignite
              */
             std::string GetTypeName() 
             {
-                IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetTypeName function is not defined for portable type.");
+                IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "GetTypeName function is not defined for portable type.");
             }
 
             /**
@@ -190,7 +190,7 @@ namespace ignite
              */
             void Write(PortableWriter& writer, const T& obj)
             {
-                IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Write function is not defined for portable type.");
+                IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Write function is not defined for portable type.");
             }
 
             /**
@@ -201,7 +201,7 @@ namespace ignite
              */
             T Read(PortableReader& reader)
             {
-                IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "Read function is not defined for portable type.");
+                IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "Read function is not defined for portable type.");
             }
 
             /**
@@ -222,7 +222,7 @@ namespace ignite
              */
             T GetNull()
             {
-                IGNITE_ERROR_1(GridError::IGNITE_ERR_PORTABLE, "GetNull function is not defined for portable type.");
+                IGNITE_ERROR_1(IgniteError::IGNITE_ERR_PORTABLE, "GetNull function is not defined for portable type.");
             }
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/project/vs/core.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/project/vs/core.vcxproj b/modules/platform/src/main/cpp/core/project/vs/core.vcxproj
index de90f65..210c8b5 100644
--- a/modules/platform/src/main/cpp/core/project/vs/core.vcxproj
+++ b/modules/platform/src/main/cpp/core/project/vs/core.vcxproj
@@ -199,7 +199,7 @@
     <ClInclude Include="..\..\include\ignite\cache\query\query_text.h" />
     <ClInclude Include="..\..\include\ignite\grid.h" />
     <ClInclude Include="..\..\include\ignite\grid_configuration.h" />
-    <ClInclude Include="..\..\include\ignite\grid_error.h" />
+    <ClInclude Include="..\..\include\ignite\ignite_error.h" />
     <ClInclude Include="..\..\include\ignite\grid_factory.h" />
     <ClInclude Include="..\..\include\ignite\guid.h" />
     <ClInclude Include="..\..\include\ignite\impl\cache\cache_impl.h" />
@@ -235,7 +235,7 @@
   <ItemGroup>
     <ClCompile Include="..\..\os\win\src\impl\utils.cpp" />
     <ClCompile Include="..\..\src\grid.cpp" />
-    <ClCompile Include="..\..\src\grid_error.cpp" />
+    <ClCompile Include="..\..\src\ignite_error.cpp" />
     <ClCompile Include="..\..\src\grid_factory.cpp" />
     <ClCompile Include="..\..\src\guid.cpp" />
     <ClCompile Include="..\..\src\impl\cache\cache_impl.cpp" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters b/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters
index 5747f10..db21b54 100644
--- a/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters
+++ b/modules/platform/src/main/cpp/core/project/vs/core.vcxproj.filters
@@ -49,7 +49,7 @@
     <ClCompile Include="..\..\src\grid.cpp">
       <Filter>Code</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\grid_error.cpp">
+    <ClCompile Include="..\..\src\ignite_error.cpp">
       <Filter>Code</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\grid_factory.cpp">
@@ -159,7 +159,7 @@
     <ClInclude Include="..\..\include\ignite\grid_configuration.h">
       <Filter>Code</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\include\ignite\grid_error.h">
+    <ClInclude Include="..\..\include\ignite\ignite_error.h">
       <Filter>Code</Filter>
     </ClInclude>
     <ClInclude Include="..\..\include\ignite\grid_factory.h">

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel b/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel
index de90f65..210c8b5 100644
--- a/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel
+++ b/modules/platform/src/main/cpp/core/project/vs/core.vcxprojrel
@@ -199,7 +199,7 @@
     <ClInclude Include="..\..\include\ignite\cache\query\query_text.h" />
     <ClInclude Include="..\..\include\ignite\grid.h" />
     <ClInclude Include="..\..\include\ignite\grid_configuration.h" />
-    <ClInclude Include="..\..\include\ignite\grid_error.h" />
+    <ClInclude Include="..\..\include\ignite\ignite_error.h" />
     <ClInclude Include="..\..\include\ignite\grid_factory.h" />
     <ClInclude Include="..\..\include\ignite\guid.h" />
     <ClInclude Include="..\..\include\ignite\impl\cache\cache_impl.h" />
@@ -235,7 +235,7 @@
   <ItemGroup>
     <ClCompile Include="..\..\os\win\src\impl\utils.cpp" />
     <ClCompile Include="..\..\src\grid.cpp" />
-    <ClCompile Include="..\..\src\grid_error.cpp" />
+    <ClCompile Include="..\..\src\ignite_error.cpp" />
     <ClCompile Include="..\..\src\grid_factory.cpp" />
     <ClCompile Include="..\..\src\guid.cpp" />
     <ClCompile Include="..\..\src\impl\cache\cache_impl.cpp" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/grid_error.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/grid_error.cpp b/modules/platform/src/main/cpp/core/src/grid_error.cpp
deleted file mode 100644
index e9d075e..0000000
--- a/modules/platform/src/main/cpp/core/src/grid_error.cpp
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include <ignite/common/java.h>
-
-#include "ignite/impl/utils.h"
-#include "ignite/grid_error.h"
-
-using namespace ignite::common::java;
-using namespace ignite::impl::utils;
-
-namespace ignite
-{
-    void GridError::ThrowIfNeeded(GridError& err)
-    {
-        if (err.code != IGNITE_SUCCESS)
-            throw err;
-    }
-
-    GridError::GridError() : code(IGNITE_SUCCESS), msg(NULL)
-    {
-        // No-op.
-    }
-
-    GridError::GridError(int32_t code) : code(code), msg(NULL)
-    {
-        // No-op.
-    }
-
-    GridError::GridError(int32_t code, const char* msg)
-    {
-        this->code = code;
-        this->msg = CopyChars(msg);
-    }
-
-    GridError::GridError(const GridError& other)
-    {
-        this->code = other.code;
-        this->msg = CopyChars(other.msg);
-    }
-
-    GridError& GridError::operator=(const GridError& other)
-    {
-        if (this != &other)
-        {
-            GridError tmp(other);
-
-            int tmpCode = code;
-            char* tmpMsg = msg;
-            
-            code = tmp.code;
-            msg = tmp.msg;
-
-            tmp.code = tmpCode;
-            tmp.msg = tmpMsg;
-        }
-
-        return *this;
-    }
-
-    GridError::~GridError()
-    {
-        ReleaseChars(msg);
-    }
-
-    int32_t GridError::GetCode()
-    {
-        return code;
-    }
-
-    const char* GridError::GetText()
-    {
-        if (code == IGNITE_SUCCESS)
-            return "Operation completed successfully.";
-        else if (msg)
-            return msg;
-        else
-            return  "No additional information available.";
-    }
-    
-    void GridError::SetError(const int jniCode, const char* jniCls, const char* jniMsg, GridError* err)
-    {
-        if (jniCode == IGNITE_JNI_ERR_SUCCESS)
-            *err = GridError();
-        else if (jniCode == IGNITE_JNI_ERR_GENERIC)
-        {
-            // The most common case when we have Java exception "in hands" and must map it to respective code.
-            if (jniCls)
-            {
-                std::string jniCls0 = jniCls;
-
-                if (jniCls0.compare("java.lang.NoClassDefFoundError") == 0)
-                {
-                    std::stringstream stream; 
-
-                    stream << "Java class is not found (did you set IGNITE_HOME environment variable?)";
-
-                    if (jniMsg)
-                        stream << ": " << jniMsg;
-                    
-                    *err = GridError(IGNITE_ERR_JVM_NO_CLASS_DEF_FOUND, stream.str().c_str());
-                }
-                else if (jniCls0.compare("java.lang.NoSuchMethodError") == 0)
-                {
-                    std::stringstream stream;
-
-                    stream << "Java method is not found (did you set IGNITE_HOME environment variable?)";
-
-                    if (jniMsg)
-                        stream << ": " << jniMsg;
-
-                    *err = GridError(IGNITE_ERR_JVM_NO_SUCH_METHOD, stream.str().c_str());
-                }
-                else if (jniCls0.compare("java.lang.IllegalArgumentException") == 0)
-                    *err = GridError(IGNITE_ERR_ILLEGAL_ARGUMENT, jniMsg);
-                else if (jniCls0.compare("java.lang.IllegalStateException") == 0)
-                    *err = GridError(IGNITE_ERR_ILLEGAL_STATE, jniMsg);
-                else if (jniCls0.compare("java.lang.UnsupportedOperationException") == 0)
-                    *err = GridError(IGNITE_ERR_UNSUPPORTED_OPERATION, jniMsg);
-                else if (jniCls0.compare("java.lang.InterruptedException") == 0)
-                    *err = GridError(IGNITE_ERR_INTERRUPTED, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.cluster.ClusterGroupEmptyException") == 0)
-                    *err = GridError(IGNITE_ERR_CLUSTER_GROUP_EMPTY, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.cluster.ClusterTopologyException") == 0)
-                    *err = GridError(IGNITE_ERR_CLUSTER_TOPOLOGY, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.compute.ComputeExecutionRejectedException") == 0)
-                    *err = GridError(IGNITE_ERR_COMPUTE_EXECUTION_REJECTED, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.compute.ComputeJobFailoverException") == 0)
-                    *err = GridError(IGNITE_ERR_COMPUTE_JOB_FAILOVER, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.compute.ComputeTaskCancelledException") == 0)
-                    *err = GridError(IGNITE_ERR_COMPUTE_TASK_CANCELLED, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.compute.ComputeTaskTimeoutException") == 0)
-                    *err = GridError(IGNITE_ERR_COMPUTE_TASK_TIMEOUT, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.compute.ComputeUserUndeclaredException") == 0)
-                    *err = GridError(IGNITE_ERR_COMPUTE_USER_UNDECLARED_EXCEPTION, jniMsg);
-                else if (jniCls0.compare("javax.cache.CacheException") == 0)
-                    *err = GridError(IGNITE_ERR_CACHE, jniMsg);
-                else if (jniCls0.compare("javax.cache.integration.CacheLoaderException") == 0)
-                    *err = GridError(IGNITE_ERR_CACHE_LOADER, jniMsg);
-                else if (jniCls0.compare("javax.cache.integration.CacheWriterException") == 0)
-                    *err = GridError(IGNITE_ERR_CACHE_WRITER, jniMsg);
-                else if (jniCls0.compare("javax.cache.processor.EntryProcessorException") == 0)
-                    *err = GridError(IGNITE_ERR_ENTRY_PROCESSOR, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.cache.CacheAtomicUpdateTimeoutException") == 0)
-                    *err = GridError(IGNITE_ERR_CACHE_ATOMIC_UPDATE_TIMEOUT, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.cache.CachePartialUpdateException") == 0)
-                    *err = GridError(IGNITE_ERR_CACHE_PARTIAL_UPDATE, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.transactions.TransactionOptimisticException") == 0)
-                    *err = GridError(IGNITE_ERR_TX_OPTIMISTIC, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.transactions.TransactionTimeoutException") == 0)
-                    *err = GridError(IGNITE_ERR_TX_TIMEOUT, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.transactions.TransactionRollbackException") == 0)
-                    *err = GridError(IGNITE_ERR_TX_ROLLBACK, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.transactions.TransactionHeuristicException") == 0)
-                    *err = GridError(IGNITE_ERR_TX_HEURISTIC, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.IgniteAuthenticationException") == 0)
-                    *err = GridError(IGNITE_ERR_AUTHENTICATION, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.plugin.security.GridSecurityException") == 0)
-                    *err = GridError(IGNITE_ERR_SECURITY, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.IgniteException") == 0)
-                    *err = GridError(IGNITE_ERR_GENERIC, jniMsg);
-                else if (jniCls0.compare("org.apache.ignite.IgniteCheckedException") == 0)
-                    *err = GridError(IGNITE_ERR_GENERIC, jniMsg);
-                else
-                {
-                    std::stringstream stream;
-                    
-                    stream << "Java exception occurred [cls=" << jniCls0;
-
-                    if (jniMsg)
-                        stream << ", msg=" << jniMsg;
-
-                    stream << "]";
-
-                    *err = GridError(IGNITE_ERR_UNKNOWN, stream.str().c_str());
-                }                    
-            }
-            else
-            {
-                // JNI class name is not available. Something really weird.
-                *err = GridError(IGNITE_ERR_UNKNOWN);
-            }
-        }
-        else if (jniCode == IGNITE_JNI_ERR_JVM_INIT)
-        {
-            std::stringstream stream;
-
-            stream << "Failed to initialize JVM [errCls=";
-
-            if (jniCls)
-                stream << jniCls;
-            else
-                stream << "N/A";
-
-            stream << ", errMsg=";
-
-            if (jniMsg)
-                stream << jniMsg;
-            else
-                stream << "N/A";
-
-            stream << "]";
-
-            *err = GridError(IGNITE_ERR_JVM_INIT, stream.str().c_str());
-        }
-        else if (jniCode == IGNITE_JNI_ERR_JVM_ATTACH)
-            *err = GridError(IGNITE_ERR_JVM_ATTACH, "Failed to attach to JVM.");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/grid_factory.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/grid_factory.cpp b/modules/platform/src/main/cpp/core/src/grid_factory.cpp
index 8fa6d26..b9dcc71 100644
--- a/modules/platform/src/main/cpp/core/src/grid_factory.cpp
+++ b/modules/platform/src/main/cpp/core/src/grid_factory.cpp
@@ -114,23 +114,23 @@ namespace ignite
         return Start(cfg, static_cast<const char*>(NULL));
     }
 
-    Grid GridFactory::Start(const GridConfiguration& cfg, GridError* err)
+    Grid GridFactory::Start(const GridConfiguration& cfg, IgniteError* err)
     {
         return Start(cfg, NULL, err);
     }
 
     Grid GridFactory::Start(const GridConfiguration& cfg, const char* name)
     {
-        GridError err;
+        IgniteError err;
 
         Grid res = Start(cfg, name, &err);
 
-        GridError::ThrowIfNeeded(err);
+        IgniteError::ThrowIfNeeded(err);
 
         return res;
     }
 
-    Grid GridFactory::Start(const GridConfiguration& cfg, const char* name, GridError* err)
+    Grid GridFactory::Start(const GridConfiguration& cfg, const char* name, IgniteError* err)
     {
         bool failed = false;
 
@@ -158,7 +158,7 @@ namespace ignite
 
             if (!jvmLibFound)
             {
-                *err = GridError(GridError::IGNITE_ERR_JVM_LIB_NOT_FOUND,
+                *err = IgniteError(IgniteError::IGNITE_ERR_JVM_LIB_NOT_FOUND,
                     "JVM library is not found (did you set JAVA_HOME environment variable?)");
 
                 failed = true;
@@ -167,7 +167,7 @@ namespace ignite
             if (!failed) {
                 if (!LoadJvmLibrary(jvmLib))
                 {
-                    *err = GridError(GridError::IGNITE_ERR_JVM_LIB_LOAD_FAILED, "Failed to load JVM library.");
+                    *err = IgniteError(IgniteError::IGNITE_ERR_JVM_LIB_LOAD_FAILED, "Failed to load JVM library.");
 
                     failed = true;
                 }
@@ -225,7 +225,7 @@ namespace ignite
 
                 if (!ctx.Get())
                 {
-                    GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                    IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
                     
                     failed = true;
                 }
@@ -251,7 +251,7 @@ namespace ignite
                     ReleaseChars(name0);
 
                     if (!javaRef) {
-                        GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                        IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
                         
                         failed = true;
                     }
@@ -264,7 +264,7 @@ namespace ignite
                 }
             }
             else {
-                *err = GridError(GridError::IGNITE_ERR_JVM_NO_CLASSPATH,
+                *err = IgniteError(IgniteError::IGNITE_ERR_JVM_NO_CLASSPATH,
                     "Java classpath is empty (did you set IGNITE_HOME environment variable?)");
 
                 failed = true;
@@ -293,23 +293,23 @@ namespace ignite
         return Get(static_cast<const char*>(NULL));
     }
 
-    Grid GridFactory::Get(GridError* err)
+    Grid GridFactory::Get(IgniteError* err)
     {
         return Get(NULL, err);
     }
 
     Grid GridFactory::Get(const char* name)
     {
-        GridError err;
+        IgniteError err;
 
         Grid res = Get(name, &err);
 
-        GridError::ThrowIfNeeded(err);
+        IgniteError::ThrowIfNeeded(err);
 
         return res;
     }
 
-    Grid GridFactory::Get(const char* name, GridError* err)
+    Grid GridFactory::Get(const char* name, IgniteError* err)
     {
         Grid res;
 
@@ -324,16 +324,16 @@ namespace ignite
 
             SharedPointer<JniContext> ctx(JniContext::Create(NULL, 0, JniHandlers(), &jniErr));
 
-            GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-            if (err->GetCode() == GridError::IGNITE_SUCCESS)
+            if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
             {
                 // 2. Get environment pointer.
                 long long ptr = ctx.Get()->IgnitionEnvironmentPointer(name0, &jniErr);
 
-                GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-                if (err->GetCode() == GridError::IGNITE_SUCCESS)
+                if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
                 {
                     if (ptr != 0)
                     {
@@ -346,7 +346,7 @@ namespace ignite
                         // 4. Get fresh node reference.
                         jobject ref = ctx.Get()->IgnitionInstance(name0, &jniErr);
 
-                        if (err->GetCode() == GridError::IGNITE_SUCCESS) {
+                        if (err->GetCode() == IgniteError::IGNITE_SUCCESS) {
                             if (ref)
                             {
                                 GridImpl* impl = new GridImpl(*env, ref);
@@ -355,14 +355,14 @@ namespace ignite
                             }
                             else
                                 // Error: concurrent node stop.
-                                *err = GridError(GridError::IGNITE_ERR_GENERIC,
+                                *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                                     "Failed to get grid instance because it was stopped concurrently.");
 
                         }
                     }
                     else
                         // Error: no node with the given name.
-                        *err = GridError(GridError::IGNITE_ERR_GENERIC,
+                        *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                             "Failed to get grid instance because it is either not started yet or already stopped.");
                 }
             }
@@ -371,7 +371,7 @@ namespace ignite
         }
         else
             // Error: no node with the given name.
-            *err = GridError(GridError::IGNITE_ERR_GENERIC,
+            *err = IgniteError(IgniteError::IGNITE_ERR_GENERIC,
                 "Failed to get grid instance because it is either not started yet or already stopped.");
 
         factoryLock.Leave();
@@ -384,23 +384,23 @@ namespace ignite
         return Stop(NULL, cancel);
     }
 
-    bool GridFactory::Stop(const bool cancel, GridError* err)
+    bool GridFactory::Stop(const bool cancel, IgniteError* err)
     {
         return Stop(NULL, cancel, err);
     }
 
     bool GridFactory::Stop(const char* name, const bool cancel)
     {
-        GridError err;
+        IgniteError err;
 
         bool res = Stop(name, cancel, &err);
 
-        GridError::ThrowIfNeeded(err);
+        IgniteError::ThrowIfNeeded(err);
 
         return res;
     }
 
-    bool GridFactory::Stop(const char* name, const bool cancel, GridError* err)
+    bool GridFactory::Stop(const char* name, const bool cancel, IgniteError* err)
     {
         bool res = false;
 
@@ -412,9 +412,9 @@ namespace ignite
 
             SharedPointer<JniContext> ctx(JniContext::Create(NULL, 0, JniHandlers(), &jniErr));
 
-            GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-            if (err->GetCode() == GridError::IGNITE_SUCCESS)
+            if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
             {
                 char* name0 = CopyChars(name);
 
@@ -422,9 +422,9 @@ namespace ignite
 
                 ReleaseChars(name0);
 
-                GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-                if (err->GetCode() == GridError::IGNITE_SUCCESS)
+                if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
                     res = res0;
             }
         }
@@ -436,14 +436,14 @@ namespace ignite
 
     void GridFactory::StopAll(const bool cancel)
     {
-        GridError err;
+        IgniteError err;
 
         StopAll(cancel, &err);
 
-        GridError::ThrowIfNeeded(err);
+        IgniteError::ThrowIfNeeded(err);
     }
 
-    void GridFactory::StopAll(const bool cancel, GridError* err)
+    void GridFactory::StopAll(const bool cancel, IgniteError* err)
     {
         factoryLock.Enter();
 
@@ -453,13 +453,13 @@ namespace ignite
 
             SharedPointer<JniContext> ctx(JniContext::Create(NULL, 0, JniHandlers(), &jniErr));
              
-            GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+            IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
 
-            if (err->GetCode() == GridError::IGNITE_SUCCESS)
+            if (err->GetCode() == IgniteError::IGNITE_SUCCESS)
             {
                 ctx.Get()->IgnitionStopAll(cancel, &jniErr);
 
-                GridError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
+                IgniteError::SetError(jniErr.code, jniErr.errCls, jniErr.errMsg, err);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/863189fd/modules/platform/src/main/cpp/core/src/ignite_error.cpp
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/cpp/core/src/ignite_error.cpp b/modules/platform/src/main/cpp/core/src/ignite_error.cpp
new file mode 100644
index 0000000..65cd291
--- /dev/null
+++ b/modules/platform/src/main/cpp/core/src/ignite_error.cpp
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <ignite/common/java.h>
+
+#include "ignite/impl/utils.h"
+#include "ignite/ignite_error.h"
+
+using namespace ignite::common::java;
+using namespace ignite::impl::utils;
+
+namespace ignite
+{
+    void IgniteError::ThrowIfNeeded(IgniteError& err)
+    {
+        if (err.code != IGNITE_SUCCESS)
+            throw err;
+    }
+
+    IgniteError::IgniteError() : code(IGNITE_SUCCESS), msg(NULL)
+    {
+        // No-op.
+    }
+
+    IgniteError::IgniteError(int32_t code) : code(code), msg(NULL)
+    {
+        // No-op.
+    }
+
+    IgniteError::IgniteError(int32_t code, const char* msg)
+    {
+        this->code = code;
+        this->msg = CopyChars(msg);
+    }
+
+    IgniteError::IgniteError(const IgniteError& other)
+    {
+        this->code = other.code;
+        this->msg = CopyChars(other.msg);
+    }
+
+    IgniteError& IgniteError::operator=(const IgniteError& other)
+    {
+        if (this != &other)
+        {
+            IgniteError tmp(other);
+
+            int tmpCode = code;
+            char* tmpMsg = msg;
+            
+            code = tmp.code;
+            msg = tmp.msg;
+
+            tmp.code = tmpCode;
+            tmp.msg = tmpMsg;
+        }
+
+        return *this;
+    }
+
+    IgniteError::~IgniteError()
+    {
+        ReleaseChars(msg);
+    }
+
+    int32_t IgniteError::GetCode()
+    {
+        return code;
+    }
+
+    const char* IgniteError::GetText()
+    {
+        if (code == IGNITE_SUCCESS)
+            return "Operation completed successfully.";
+        else if (msg)
+            return msg;
+        else
+            return  "No additional information available.";
+    }
+    
+    void IgniteError::SetError(const int jniCode, const char* jniCls, const char* jniMsg, IgniteError* err)
+    {
+        if (jniCode == IGNITE_JNI_ERR_SUCCESS)
+            *err = IgniteError();
+        else if (jniCode == IGNITE_JNI_ERR_GENERIC)
+        {
+            // The most common case when we have Java exception "in hands" and must map it to respective code.
+            if (jniCls)
+            {
+                std::string jniCls0 = jniCls;
+
+                if (jniCls0.compare("java.lang.NoClassDefFoundError") == 0)
+                {
+                    std::stringstream stream; 
+
+                    stream << "Java class is not found (did you set IGNITE_HOME environment variable?)";
+
+                    if (jniMsg)
+                        stream << ": " << jniMsg;
+                    
+                    *err = IgniteError(IGNITE_ERR_JVM_NO_CLASS_DEF_FOUND, stream.str().c_str());
+                }
+                else if (jniCls0.compare("java.lang.NoSuchMethodError") == 0)
+                {
+                    std::stringstream stream;
+
+                    stream << "Java method is not found (did you set IGNITE_HOME environment variable?)";
+
+                    if (jniMsg)
+                        stream << ": " << jniMsg;
+
+                    *err = IgniteError(IGNITE_ERR_JVM_NO_SUCH_METHOD, stream.str().c_str());
+                }
+                else if (jniCls0.compare("java.lang.IllegalArgumentException") == 0)
+                    *err = IgniteError(IGNITE_ERR_ILLEGAL_ARGUMENT, jniMsg);
+                else if (jniCls0.compare("java.lang.IllegalStateException") == 0)
+                    *err = IgniteError(IGNITE_ERR_ILLEGAL_STATE, jniMsg);
+                else if (jniCls0.compare("java.lang.UnsupportedOperationException") == 0)
+                    *err = IgniteError(IGNITE_ERR_UNSUPPORTED_OPERATION, jniMsg);
+                else if (jniCls0.compare("java.lang.InterruptedException") == 0)
+                    *err = IgniteError(IGNITE_ERR_INTERRUPTED, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.cluster.ClusterGroupEmptyException") == 0)
+                    *err = IgniteError(IGNITE_ERR_CLUSTER_GROUP_EMPTY, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.cluster.ClusterTopologyException") == 0)
+                    *err = IgniteError(IGNITE_ERR_CLUSTER_TOPOLOGY, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.compute.ComputeExecutionRejectedException") == 0)
+                    *err = IgniteError(IGNITE_ERR_COMPUTE_EXECUTION_REJECTED, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.compute.ComputeJobFailoverException") == 0)
+                    *err = IgniteError(IGNITE_ERR_COMPUTE_JOB_FAILOVER, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.compute.ComputeTaskCancelledException") == 0)
+                    *err = IgniteError(IGNITE_ERR_COMPUTE_TASK_CANCELLED, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.compute.ComputeTaskTimeoutException") == 0)
+                    *err = IgniteError(IGNITE_ERR_COMPUTE_TASK_TIMEOUT, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.compute.ComputeUserUndeclaredException") == 0)
+                    *err = IgniteError(IGNITE_ERR_COMPUTE_USER_UNDECLARED_EXCEPTION, jniMsg);
+                else if (jniCls0.compare("javax.cache.CacheException") == 0)
+                    *err = IgniteError(IGNITE_ERR_CACHE, jniMsg);
+                else if (jniCls0.compare("javax.cache.integration.CacheLoaderException") == 0)
+                    *err = IgniteError(IGNITE_ERR_CACHE_LOADER, jniMsg);
+                else if (jniCls0.compare("javax.cache.integration.CacheWriterException") == 0)
+                    *err = IgniteError(IGNITE_ERR_CACHE_WRITER, jniMsg);
+                else if (jniCls0.compare("javax.cache.processor.EntryProcessorException") == 0)
+                    *err = IgniteError(IGNITE_ERR_ENTRY_PROCESSOR, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.cache.CacheAtomicUpdateTimeoutException") == 0)
+                    *err = IgniteError(IGNITE_ERR_CACHE_ATOMIC_UPDATE_TIMEOUT, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.cache.CachePartialUpdateException") == 0)
+                    *err = IgniteError(IGNITE_ERR_CACHE_PARTIAL_UPDATE, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.transactions.TransactionOptimisticException") == 0)
+                    *err = IgniteError(IGNITE_ERR_TX_OPTIMISTIC, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.transactions.TransactionTimeoutException") == 0)
+                    *err = IgniteError(IGNITE_ERR_TX_TIMEOUT, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.transactions.TransactionRollbackException") == 0)
+                    *err = IgniteError(IGNITE_ERR_TX_ROLLBACK, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.transactions.TransactionHeuristicException") == 0)
+                    *err = IgniteError(IGNITE_ERR_TX_HEURISTIC, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.IgniteAuthenticationException") == 0)
+                    *err = IgniteError(IGNITE_ERR_AUTHENTICATION, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.plugin.security.GridSecurityException") == 0)
+                    *err = IgniteError(IGNITE_ERR_SECURITY, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.IgniteException") == 0)
+                    *err = IgniteError(IGNITE_ERR_GENERIC, jniMsg);
+                else if (jniCls0.compare("org.apache.ignite.IgniteCheckedException") == 0)
+                    *err = IgniteError(IGNITE_ERR_GENERIC, jniMsg);
+                else
+                {
+                    std::stringstream stream;
+                    
+                    stream << "Java exception occurred [cls=" << jniCls0;
+
+                    if (jniMsg)
+                        stream << ", msg=" << jniMsg;
+
+                    stream << "]";
+
+                    *err = IgniteError(IGNITE_ERR_UNKNOWN, stream.str().c_str());
+                }                    
+            }
+            else
+            {
+                // JNI class name is not available. Something really weird.
+                *err = IgniteError(IGNITE_ERR_UNKNOWN);
+            }
+        }
+        else if (jniCode == IGNITE_JNI_ERR_JVM_INIT)
+        {
+            std::stringstream stream;
+
+            stream << "Failed to initialize JVM [errCls=";
+
+            if (jniCls)
+                stream << jniCls;
+            else
+                stream << "N/A";
+
+            stream << ", errMsg=";
+
+            if (jniMsg)
+                stream << jniMsg;
+            else
+                stream << "N/A";
+
+            stream << "]";
+
+            *err = IgniteError(IGNITE_ERR_JVM_INIT, stream.str().c_str());
+        }
+        else if (jniCode == IGNITE_JNI_ERR_JVM_ATTACH)
+            *err = IgniteError(IGNITE_ERR_JVM_ATTACH, "Failed to attach to JVM.");
+    }
+}
\ No newline at end of file