summaryrefslogtreecommitdiffstats
path: root/engine-d/src
diff options
context:
space:
mode:
authortang peng <tang.peng5@zte.com.cn>2021-11-08 10:17:25 +0000
committerGerrit Code Review <gerrit@onap.org>2021-11-08 10:17:25 +0000
commit5fa7c2ef60c8c26fd5a77340a1c557f92b2bc3f8 (patch)
tree41aba519cd9b848b134b932ee915981c1be1697d /engine-d/src
parente62c96c88b0b52e93685a6c267f40127755f4bf2 (diff)
parent250751bc1942dfa15b8f24bbc2576ab9ab5c55fd (diff)
Merge "Exception handling to continue with other events"
Diffstat (limited to 'engine-d/src')
-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;
}
}