From c312e69bf48d565a348cdc126643f66e4a55b44a Mon Sep 17 00:00:00 2001 From: shamalka Date: Mon, 29 Aug 2022 17:14:10 +0530 Subject: [PATCH] Revert unwanted change --- .../mgt/core/service/DeviceManagementProviderServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index f4b991c711..784b8683d5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -616,6 +616,10 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv String msg = "Error occurred while initiating transaction"; log.error(msg, e); throw new DeviceManagementException(msg, e); + } catch (Exception e) { + String msg = "Error occurred while dis-enrolling device: " + deviceId.getId(); + log.error(msg, e); + throw new DeviceManagementException(msg, e); } finally { DeviceManagementDAOFactory.closeConnection(); }