diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2017-09-07 13:06:55 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-09-08 12:08:14 +0000 |
commit | e62b49fe00bf71ea80cbbbf2037a6c2565f88edd (patch) | |
tree | 0d7f1ca10769ac43d8eb2b377e44f28ab3f3754e | |
parent | 5c3f7eec97ceda0427495881dea7168c3fe13139 (diff) |
Fix error-handling issues found by Sonar
Change-Id: Ic370f72c16beaf56003021a6a89f751de8b744b8
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
(cherry picked from commit fc809432b5560bf36e7d5b14b998751ed0e9a229)
3 files changed, 4 insertions, 4 deletions
diff --git a/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java b/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java index 2e260e108..af9e5dadd 100755 --- a/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java +++ b/ioam/impl/src/main/java/io/fd/hc2vpp/vppioam/impl/config/IoamTraceWriterCustomizer.java @@ -93,7 +93,7 @@ public class IoamTraceWriterCustomizer extends FutureJVppIoamtraceCustomizer } public TraceProfileAddReply addTraceConfig(TraceConfig traceConfig, - final InstanceIdentifier<TraceConfig> id) throws Exception { + final InstanceIdentifier<TraceConfig> id) throws WriteFailedException { TraceProfileAdd traceProfileAdd = new TraceProfileAdd(); traceProfileAdd.traceType = traceConfig.getTraceType().byteValue(); //trace type @@ -110,7 +110,7 @@ public class IoamTraceWriterCustomizer extends FutureJVppIoamtraceCustomizer } public TraceProfileDelReply deleteTraceConfig(TraceConfig dataBefore, - final InstanceIdentifier<TraceConfig> id) throws Exception { + final InstanceIdentifier<TraceConfig> id) throws WriteFailedException { TraceProfileDel del = new TraceProfileDel(); /* Write to VPP */ diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/Ipv4Translator.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/Ipv4Translator.java index 02f89d9f8..69ef7f3ab 100644 --- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/Ipv4Translator.java +++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/Ipv4Translator.java @@ -116,7 +116,7 @@ public interface Ipv4Translator extends ByteDataTranslator { String.valueOf(prefix))); } catch (UnknownHostException e) { throw new IllegalArgumentException( - "Cannot create prefix for address[" + Arrays.toString(address) + "],prefix[" + prefix + "]"); + "Cannot create prefix for address[" + Arrays.toString(address) + "],prefix[" + prefix + "]", e); } } } diff --git a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/Ipv6Translator.java b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/Ipv6Translator.java index 664bdc37d..d6e23e77d 100644 --- a/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/Ipv6Translator.java +++ b/vpp-common/vpp-translate-utils/src/main/java/io/fd/hc2vpp/common/translate/util/Ipv6Translator.java @@ -131,7 +131,7 @@ public interface Ipv6Translator extends ByteDataTranslator { String.valueOf(prefix))); } catch (UnknownHostException e) { throw new IllegalArgumentException( - "Cannot create prefix for address[" + Arrays.toString(address) + "],prefix[" + prefix + "]"); + "Cannot create prefix for address[" + Arrays.toString(address) + "],prefix[" + prefix + "]", e); } } |