Catch MetadataManagementException and throw ApplicationManagementException

visible-roles
Nishan Sangeeth 1 year ago
parent 229c8dcb34
commit 0f38c1a9df

@ -403,7 +403,7 @@ public interface ApplicationManager {
* To validate the application creating request
*
*/
<T> void validateAppCreatingRequest(T param) throws ApplicationManagementException, RequestValidatingException, MetadataManagementException;
<T> void validateAppCreatingRequest(T param) throws ApplicationManagementException, RequestValidatingException;
/**
*

@ -3516,7 +3516,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
@Override
public <T> void validateAppCreatingRequest(T param)
throws ApplicationManagementException, RequestValidatingException, MetadataManagementException {
throws ApplicationManagementException, RequestValidatingException {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(true);
String userName = PrivilegedCarbonContext.getThreadLocalCarbonContext().getUsername();
int deviceTypeId = -1;
@ -3751,7 +3751,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
} catch (MetadataManagementException e) {
String msg = "Error occurred while retrieving metadata list";
log.error(msg, e);
throw new MetadataManagementException(msg, e);
throw new ApplicationManagementException(msg, e);
} finally {
ConnectionManagerUtil.closeDBConnection();
}

Loading…
Cancel
Save