From 114c18d79281e2232155ee1d12d31d35846b1a5e Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 7 Dec 2022 00:07:14 +0100 Subject: [PATCH] Improve failure message When we are failing a future, make sure to include the name of the node. Change-Id: If721b9dcef4b9fca23d087db6be3b73897008575 Signed-off-by: Robert Varga --- .../netconf/topology/spi/AbstractNetconfTopology.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/AbstractNetconfTopology.java b/netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/AbstractNetconfTopology.java index c7dbb703de..974b0be68e 100644 --- a/netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/AbstractNetconfTopology.java +++ b/netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/AbstractNetconfTopology.java @@ -170,12 +170,13 @@ public abstract class AbstractNetconfTopology implements NetconfTopology { @Override public ListenableFuture disconnectNode(final NodeId nodeId) { - LOG.debug("Disconnecting RemoteDevice{{}}", nodeId.getValue()); + final var nodeName = nodeId.getValue(); + LOG.debug("Disconnecting RemoteDevice{{}}", nodeName); final NetconfConnectorDTO connectorDTO = activeConnectors.remove(nodeId); if (connectorDTO == null) { return Futures.immediateFailedFuture( - new IllegalStateException("Unable to disconnect device that is not connected")); + new IllegalStateException("Cannot disconnect " + nodeName + " as it is not connected")); } connectorDTO.close(); -- 2.36.6