Fixed exception management

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-client@144247 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-02-24 10:51:14 +00:00
parent 23104b8a78
commit d4f5dc2db5
1 changed files with 5 additions and 4 deletions

View File

@ -13,6 +13,7 @@ import javax.xml.ws.EndpointReference;
import org.gcube.common.clients.delegates.AsyncProxyDelegate;
import org.gcube.common.clients.delegates.ProxyDelegate;
import org.gcube.common.clients.exceptions.ServiceException;
import org.gcube.informationsystem.impl.utils.ISMapper;
import org.gcube.informationsystem.model.ER;
import org.gcube.informationsystem.model.ISManageable;
@ -78,7 +79,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
throw e;
} catch (Exception e) {
logger.error("Error while getting {} with UUID {}", type, uuid, e);
throw new RuntimeException(e);
throw new ServiceException(e);
}
}
@ -115,7 +116,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
throw e;
} catch (Exception e) {
logger.error("Error while getting {} instances", type, e);
throw new RuntimeException(e);
throw new ServiceException(e);
}
}
@ -157,7 +158,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
throw e;
} catch (Exception e) {
logger.error("Error while getting instances of {} from/to {}", relationType, e);
throw new RuntimeException(e);
throw new ServiceException(e);
}
}
@ -199,7 +200,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
logger.error("Error while getting {}schema for {}",
polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "",
type, e);
throw new RuntimeException(e);
throw new ServiceException(e);
}
}