Fixed exception management
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-client@144242 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4473b8e201
commit
27fd7c3fef
|
@ -73,7 +73,9 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
ERType erType = delegate.make(call);
|
||||
logger.info("Got {} with UUID {} is {}", type, uuid, erType);
|
||||
return erType;
|
||||
|
||||
} catch (ResourceRegistryException e) {
|
||||
logger.error("Error while getting {} with UUID {}", type, uuid, e);
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while getting {} with UUID {}", type, uuid, e);
|
||||
throw new ResourceRegistryException(e);
|
||||
|
@ -108,6 +110,9 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
|
||||
return ISMapper.unmarshalList(Entity.class, ret);
|
||||
|
||||
} catch (ResourceRegistryException e) {
|
||||
logger.error("Error while getting {} instances", type, e);
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while getting {} instances", type, e);
|
||||
throw new ResourceRegistryException(e);
|
||||
|
@ -147,6 +152,9 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
|
||||
return ISMapper.unmarshalList(Resource.class, ret);
|
||||
|
||||
} catch (ResourceRegistryException e) {
|
||||
logger.error("Error while getting instances of {} from/to {}", relationType, e);
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while getting instances of {} from/to {}", relationType, e);
|
||||
throw new ResourceRegistryException(e);
|
||||
|
@ -182,6 +190,11 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
|
||||
return TypeBinder.deserializeTypeDefinitions(schema);
|
||||
|
||||
} catch (SchemaNotFoundException e) {
|
||||
logger.error("Error while getting {}schema for {}",
|
||||
polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "",
|
||||
type, e);
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
logger.error("Error while getting {}schema for {}",
|
||||
polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "",
|
||||
|
|
Loading…
Reference in New Issue