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/09 10:53:19 UTC

[21/43] ignite git commit: IGNITE-1388 Platform .Net: cache.Invoke result in async mode should have an error flag

IGNITE-1388 Platform .Net: cache.Invoke result in async mode should have an error flag


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

Branch: refs/heads/master
Commit: 57555af62c93bdc8e012c1be7b6c6edd4d9d2ebe
Parents: 2326bb5
Author: ptupitsyn <pt...@gridgain.com>
Authored: Tue Sep 8 13:25:18 2015 +0300
Committer: ptupitsyn <pt...@gridgain.com>
Committed: Tue Sep 8 13:25:18 2015 +0300

----------------------------------------------------------------------
 .../processors/platform/cache/PlatformCache.java       | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/57555af6/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
----------------------------------------------------------------------
diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 27af344..0829617 100644
--- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -984,14 +984,21 @@ public class PlatformCache extends PlatformAbstractTarget {
     private static class EntryProcessorExceptionWriter implements PlatformFutureUtils.Writer {
         /** <inheritDoc /> */
         @Override public void write(PortableRawWriterEx writer, Object obj, Throwable err) {
-            EntryProcessorException entryEx = (EntryProcessorException) err;
+            if (err == null) {
+                writer.writeBoolean(true);  // success
 
-            writeError(writer, entryEx);
+                writer.writeObjectDetached(obj);
+            }
+            else {
+                writer.writeBoolean(false);  // failure
+
+                writeError(writer, (Exception) err);
+            }
         }
 
         /** <inheritDoc /> */
         @Override public boolean canWrite(Object obj, Throwable err) {
-            return err instanceof EntryProcessorException;
+            return true;
         }
     }