jattisha commented on code in PR #559:
URL: 
https://github.com/apache/httpcomponents-client/pull/559#discussion_r1602246401


##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/memcached/MemcachedHttpAsyncCacheStorage.java:
##########
@@ -161,7 +162,11 @@ private <T> Cancellable operation(final OperationFuture<T> 
operationFuture, fina
                 callback.completed(operationFuture.get());
             } catch (final ExecutionException ex) {
                 if (ex.getCause() instanceof Exception) {
-                    callback.failed((Exception) ex.getCause());
+                    if (ex.getCause() instanceof CancellationException) {
+                        callback.failed(new ResourceIOException("Cache 
operation was cancelled mid-flight", ex.getCause()));

Review Comment:
   Now that I'm reading this, I should probably create an 
`OperationCancelledException` that extends `ResourceIOException` and use this 
for all of these...



-- 
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: dev-unsubscr...@hc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to