summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkata Molluru <venkatamuralimohanreddy.molluru@techmahindra.com>2021-11-02 18:56:23 +0000
committertang peng <tang.peng5@zte.com.cn>2021-11-08 10:17:46 +0000
commit4be8d03ddbefe0459ee7888aa485e0ef8fa77dcf (patch)
tree9e75b6477ae20f616550ab5ba1bafa05b0419e13
parent3dbb999400967af88930ebb996cd00825658eca7 (diff)
Exception handling to continue with other events
Issue-ID: HOLMES-489 Signed-off-by: Venkata Molluru <venkatamuralimohanreddy.molluru@techmahindra.com> Change-Id: I7a7dde6df674f70a653f3511bc5257e51d877df0 (cherry picked from commit 250751bc1942dfa15b8f24bbc2576ab9ab5c55fd)
-rw-r--r--engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java b/engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java
index 8c3d4f5..af772fb 100644
--- a/engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java
+++ b/engine-d/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java
@@ -88,8 +88,13 @@ public class Subscriber {
private List<VesAlarm> extractVesAlarm(List<String> responseEntity) {
List<VesAlarm> vesAlarmList = new ArrayList<>();
for (String entity : responseEntity) {
- vesAlarmList.add(dMaaPResponseUtil.convertJsonToVesAlarm(entity));
- }
+ try {
+ vesAlarmList.add(dMaaPResponseUtil.convertJsonToVesAlarm(entity));
+ } catch (Exception e) {
+ log.error("Failed to convert the response data to VES alarm ", e);
+ //Continue with other events
+ }
+ }
return vesAlarmList;
}
}