mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Throw msg and the exception in relevent places
This commit is contained in:
parent
f59208f6e7
commit
6d324c084a
@ -49,7 +49,7 @@ public class OperationConfigurationService {
|
||||
} catch (MetadataManagementException e) {
|
||||
String msg = "Error occurred while retrieving operation configuration";
|
||||
log.error(msg, e);
|
||||
throw new OperationConfigException(e);
|
||||
throw new OperationConfigException(msg, e);
|
||||
}
|
||||
if (metadata != null) {
|
||||
return gson.fromJson(metadata.getMetaValue(), OperationConfig.class);
|
||||
@ -71,11 +71,11 @@ public class OperationConfigurationService {
|
||||
} catch (MetadataManagementException e) {
|
||||
String msg = "Error occurred while adding operation configuration";
|
||||
log.error(msg, e);
|
||||
throw new OperationConfigException(e);
|
||||
throw new OperationConfigException(msg, e);
|
||||
} catch (MetadataKeyAlreadyExistsException e) {
|
||||
String msg = "Operation configuration already exists";
|
||||
log.error(msg, e);
|
||||
throw new OperationConfigAlreadyExistsException(e);
|
||||
throw new OperationConfigAlreadyExistsException(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ public class OperationConfigurationService {
|
||||
} catch (MetadataManagementException e) {
|
||||
String msg = "Error occurred while updating operation configuration";
|
||||
log.error(msg, e);
|
||||
throw new OperationConfigException(e);
|
||||
throw new OperationConfigException(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,11 +102,11 @@ public class OperationConfigurationService {
|
||||
} catch (MetadataManagementException e) {
|
||||
String msg = "Error occurred while deleting operation configuration";
|
||||
log.error(msg, e);
|
||||
throw new OperationConfigException(e);
|
||||
throw new OperationConfigException(msg, e);
|
||||
} catch (MetadataKeyNotFoundException e) {
|
||||
String msg = "Operation configuration already exists";
|
||||
log.error(msg, e);
|
||||
throw new OperationConfigNotFoundException(e);
|
||||
throw new OperationConfigNotFoundException(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user