fixes to catch proper netconf exception
- part of ONOS-7020
Change-Id: I55c02ca9fdb97f1ae12b4e3d7b76da565f9da741
diff --git a/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/FlowRuleJuniperImpl.java b/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/FlowRuleJuniperImpl.java
index 18d08dd..d4c09dc 100644
--- a/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/FlowRuleJuniperImpl.java
+++ b/drivers/juniper/src/main/java/org/onosproject/drivers/juniper/FlowRuleJuniperImpl.java
@@ -42,7 +42,6 @@
import org.onosproject.netconf.NetconfException;
import org.onosproject.netconf.NetconfSession;
-import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@@ -100,7 +99,7 @@
String reply;
try {
reply = session.get(routingTableBuilder());
- } catch (IOException e) {
+ } catch (NetconfException e) {
throw new RuntimeException(new NetconfException("Failed to retrieve configuration.",
e));
}
@@ -241,7 +240,7 @@
type == ADD ? "added" : "removed", staticRoute);
}
}
- } catch (IOException e) {
+ } catch (NetconfException e) {
throw new RuntimeException(new NetconfException("Failed to retrieve configuration.",
e));
}
@@ -335,7 +334,7 @@
String replay;
try {
replay = session.get(commitBuilder());
- } catch (IOException e) {
+ } catch (NetconfException e) {
throw new RuntimeException(new NetconfException("Failed to retrieve configuration.",
e));
}
@@ -355,7 +354,7 @@
String replay;
try {
replay = session.get(rollbackBuilder(0));
- } catch (IOException e) {
+ } catch (NetconfException e) {
throw new RuntimeException(new NetconfException("Failed to retrieve configuration.",
e));
}