diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java index 83c9585..81f524c 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java @@ -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); } }