From 439c19e8e23d7a9c76e40142ec9c866c2cfa5df3 Mon Sep 17 00:00:00 2001 From: prathabanKavin Date: Wed, 10 May 2023 10:12:13 +0530 Subject: [PATCH] Fix exceptions and logs --- .../mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java index efe03e615a..2b20c83c77 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/ConfigOperationMSSQLDAOImpl.java @@ -70,9 +70,9 @@ public class ConfigOperationMSSQLDAOImpl extends GenericOperationDAOImpl { } } } catch (SQLException e) { - String msg = "Error occurred while adding command operation"; + String msg = "Error occurred while adding command operation" + operation.getId(); log.error(msg, e); - throw new OperationManagementDAOException(msg); + throw new OperationManagementDAOException(msg, e); } } @@ -143,12 +143,12 @@ public class ConfigOperationMSSQLDAOImpl extends GenericOperationDAOImpl { String msg = "IO Error occurred while de serialize the policy operation " + "object"; log.error(msg, e); - throw new OperationManagementDAOException(msg); + throw new OperationManagementDAOException(msg, e); } catch (ClassNotFoundException e) { String msg = "Class not found error occurred while de serialize the policy " + "operation object"; log.error(msg, e); - throw new OperationManagementDAOException(msg); + throw new OperationManagementDAOException(msg, e); } catch (SQLException e) { String msg = "SQL Error occurred while retrieving the policy operation " + "object available for the id '" @@ -190,12 +190,12 @@ public class ConfigOperationMSSQLDAOImpl extends GenericOperationDAOImpl { String msg = "IO Error occurred while de serialize the configuration " + "operation object"; log.error(msg, e); - throw new OperationManagementDAOException(msg); + throw new OperationManagementDAOException(msg, e); } catch (ClassNotFoundException e) { String msg = "Class not found error occurred while de serialize the " + "configuration operation object"; log.error(msg, e); - throw new OperationManagementDAOException(msg); + throw new OperationManagementDAOException(msg, e); } catch (SQLException e) { String msg = "SQL error occurred while retrieving the operation available " + "for the device'" + enrolmentId + "' with status '" + status.toString();