getClient().getRegistryClient().addHostDescriptor(host);
} catch (org.apache.airavata.registry.api.exception.gateway.DescriptorAlreadyExistsException e) {
throw new DescriptorAlreadyExistsException("Host descriptor " + host.getType().getHostName()
+ " already exists.", e);
} catch (RegException e) {
throw new AiravataAPIInvocationException("An internal error occurred while trying to add host descriptor"
+ host.getType().getHostName(),
e);
} catch (AiravataConfigurationException e) {
throw new AiravataAPIInvocationException("Error retrieving registry controller. " +
"An error occurred while trying to " +
"add host descriptor" + host.getType().getHostName(), e);
}
}