Catch MetadataManagementException and throw ApplicationManagementException

pull/154/head
Nishan Sangeeth 1 year ago
parent 229c8dcb34
commit 0f38c1a9df

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

Loading…
Cancel
Save