Add warning log when an invalid group name is provided

reporting
Saad Sahibjan 5 years ago
parent 20221ba2b7
commit 908161d23e

@ -1001,6 +1001,9 @@ import java.util.stream.IntStream;
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>(); List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
deviceIdentifiers.add(deviceIdentifier); deviceIdentifiers.add(deviceIdentifier);
groupManagementProviderService.addDevices(deviceGroup.getGroupId(), deviceIdentifiers); groupManagementProviderService.addDevices(deviceGroup.getGroupId(), deviceIdentifiers);
} else {
log.warn("Group name: " + groupName + " configured for device "
+ deviceIdentifier.toString() + " is invalid because the group does not exist.");
} }
} catch (GroupManagementException e) { } catch (GroupManagementException e) {
String msg = "Error occurred while trying to add the device '" + deviceIdentifier.getId() + String msg = "Error occurred while trying to add the device '" + deviceIdentifier.getId() +

Loading…
Cancel
Save