commit | 6bfdeb3215247561313a083d4131fc77d9c3792e | [log] [tgz] |
---|---|---|
author | pierventre <pier@opennetworking.org> | Thu Sep 16 15:03:41 2021 +0200 |
committer | Pier Luigi Ventre <pier@opennetworking.org> | Thu Sep 16 16:12:32 2021 +0000 |
tree | 2d28e60aa3e7da864523aece242785c4c072c1ca | |
parent | a770879a950d1cc985db1a659da701551700e886 [diff] |
Protect event handler from the exceptions Change-Id: I8c7b68f4eff1460e02dd4cc01b7d655a5d7ad581
diff --git a/core/net/src/main/java/org/onosproject/net/group/impl/GroupDriverProvider.java b/core/net/src/main/java/org/onosproject/net/group/impl/GroupDriverProvider.java index 1092d8d..51f0420 100644 --- a/core/net/src/main/java/org/onosproject/net/group/impl/GroupDriverProvider.java +++ b/core/net/src/main/java/org/onosproject/net/group/impl/GroupDriverProvider.java
@@ -130,8 +130,12 @@ } private void pollDeviceGroups(DeviceId deviceId) { - Collection<Group> groups = getGroupProgrammable(deviceId).getGroups(); - groupProviderService.pushGroupMetrics(deviceId, groups); + try { + Collection<Group> groups = getGroupProgrammable(deviceId).getGroups(); + groupProviderService.pushGroupMetrics(deviceId, groups); + } catch (Exception e) { + log.warn("Exception thrown while polling groups from {}", deviceId, e); + } } private GroupProgrammable getGroupProgrammable(DeviceId deviceId) {