Logs are added to identify the flows and groups being added in
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / AbstractSilentErrorService.java
index 6ef58b7cab8da50ac321d0e901767344aa988688..727ccff8bb95e47682e7c4c8f4a7754c7d869cb4 100644 (file)
@@ -23,16 +23,18 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 public abstract class AbstractSilentErrorService<I, O extends DataObject>
         extends AbstractSimpleService<I, O> {
 
-    protected AbstractSilentErrorService(RequestContextStack requestContextStack, DeviceContext deviceContext, Class<O> clazz) {
+    protected AbstractSilentErrorService(RequestContextStack requestContextStack,
+                                         DeviceContext deviceContext,
+                                         Class<O> clazz) {
         super(requestContextStack, deviceContext, clazz);
     }
 
     @Override
     public ListenableFuture<RpcResult<O>> handleServiceCall(@Nonnull I input,
                                                             @Nullable final Function<OfHeader, Boolean> isComplete) {
-        return Futures.withFallback(
-                super.handleServiceCall(input, isComplete),
-                t -> RpcResultBuilder.<O>failed().buildFuture());
+        return Futures.catching(
+            super.handleServiceCall(input, isComplete),
+            Throwable.class,
+            t -> RpcResultBuilder.<O>failed().build());
     }
-
 }