From fb6666efe7b6009528e98702efc66e9118011174 Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Thu, 6 Oct 2016 08:54:02 +0200 Subject: HONEYCOMB-236 - Unified read/write exceptions Change-Id: Idde761d0c0c2c4d96555ef94dbdaa87fad889493 Signed-off-by: Jan Srnicek --- .../dump/executor/MapResolversDumpExecutor.java | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java') diff --git a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java index 7df537040..8f19e7084 100755 --- a/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java +++ b/lisp/lisp2vpp/src/main/java/io/fd/honeycomb/lisp/translate/read/dump/executor/MapResolversDumpExecutor.java @@ -17,17 +17,14 @@ package io.fd.honeycomb.lisp.translate.read.dump.executor; +import io.fd.honeycomb.translate.read.ReadFailedException; import io.fd.honeycomb.translate.util.read.cache.EntityDumpExecutor; -import io.fd.honeycomb.translate.util.read.cache.exceptions.execution.DumpExecutionFailedException; -import io.fd.honeycomb.translate.util.read.cache.exceptions.execution.i.DumpCallFailedException; -import io.fd.honeycomb.translate.util.read.cache.exceptions.execution.i.DumpTimeoutException; import io.fd.honeycomb.translate.vpp.util.JvppReplyConsumer; -import java.util.concurrent.TimeoutException; -import javax.annotation.Nonnull; -import io.fd.vpp.jvpp.VppBaseCallException; import io.fd.vpp.jvpp.core.dto.LispMapResolverDetailsReplyDump; import io.fd.vpp.jvpp.core.dto.LispMapResolverDump; import io.fd.vpp.jvpp.core.future.FutureJVppCore; +import javax.annotation.Nonnull; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class MapResolversDumpExecutor extends AbstractJvppDumpExecutor @@ -38,14 +35,9 @@ public class MapResolversDumpExecutor extends AbstractJvppDumpExecutor } @Override - public LispMapResolverDetailsReplyDump executeDump(final Void params) throws DumpExecutionFailedException { - try { - return getReply(vppApi.lispMapResolverDump(new LispMapResolverDump()).toCompletableFuture()); - } catch (TimeoutException e) { - throw DumpTimeoutException - .wrapTimeoutException("Map resolver dump execution ended in timeout", e); - } catch (VppBaseCallException e) { - throw DumpCallFailedException.wrapFailedCallException("Map resolver dump execution failed", e); - } + @Nonnull + public LispMapResolverDetailsReplyDump executeDump(final InstanceIdentifier identifier, final Void params) throws + ReadFailedException { + return getReplyForRead(vppApi.lispMapResolverDump(new LispMapResolverDump()).toCompletableFuture(), identifier); } } -- cgit 1.2.3-korg