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);
|
||||
|
@ -107,7 +109,10 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
logger.info("Got instances of {} are {}", type, ret);
|
||||
|
||||
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);
|
||||
|
@ -146,7 +151,10 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
reference.toString(), ret);
|
||||
|
||||
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);
|
||||
|
@ -181,7 +189,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
logger.info("Got schema for {} is {}", type, schema);
|
||||
|
||||
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