kezhuw commented on code in PR #464:
URL: https://github.com/apache/curator/pull/464#discussion_r1218026939


##########
curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java:
##########
@@ -694,17 +715,67 @@ <DATA_TYPE> void 
processBackgroundOperation(OperationAndData<DATA_TYPE> operatio
         }
     }
 
+    private void abortOperation(OperationAndData<?> operation, Throwable e)
+    {
+        if (operation.getCallback() == null) {
+            return;
+        }
+        CuratorEvent event;
+        if (e instanceof KeeperException)
+        {
+            event = new CuratorEventImpl(this, operation.getEventType(), 
((KeeperException) e).code().intValue(), ((KeeperException) e).getPath(), null, 
operation.getContext(), null, null, null, null, null, null);
+        }
+        else if (getState() == CuratorFrameworkState.STARTED)
+        {
+            event = new CuratorEventImpl(this, operation.getEventType(), 
KeeperException.Code.SYSTEMERROR.intValue(), null, null, 
operation.getContext(), null, null, null, null, null, null);

Review Comment:
   This `SYSTEMERROR` matches `AsyncResultImpl`'s choice. I don't have any 
other candidates.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@curator.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to