Added logs
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@134330 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fb98a6e857
commit
6dff36cb0c
|
@ -427,6 +427,7 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
return vertex;
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Error Creating {} with {}", entityType, jsonRepresentation, e);
|
||||
if (orientGraph != null) {
|
||||
orientGraph.rollback();
|
||||
}
|
||||
|
@ -446,6 +447,9 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
String jsonProperties)
|
||||
throws FacetNotFoundException, ResourceNotFoundException,
|
||||
ResourceRegistryException {
|
||||
|
||||
logger.trace("Trying to create {} with {}", relationType, jsonProperties);
|
||||
|
||||
OrientGraph orientGraph = null;
|
||||
|
||||
if (relationType == null || relationType.compareTo("") == 0) {
|
||||
|
@ -485,6 +489,7 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
relationType, relationBaseClass, edgeProperties, false);
|
||||
|
||||
} catch(ResourceNotFoundException rnfe){
|
||||
logger.trace("Error Creating {} with {}", relationType, jsonProperties, rnfe);
|
||||
throw rnfe;
|
||||
} catch (Exception e) {
|
||||
throw new ResourceRegistryException(e);
|
||||
|
@ -498,6 +503,7 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
Map<String, Object> edgeProperties,
|
||||
boolean deferredCommit) throws ResourceRegistryException {
|
||||
|
||||
logger.info("Trying to create {} with {}", relationType, edgeProperties);
|
||||
|
||||
try {
|
||||
|
||||
|
@ -541,14 +547,19 @@ public class EntityManagementImpl implements EntityManagement {
|
|||
if (!deferredCommit) {
|
||||
orientGraph.commit();
|
||||
}
|
||||
|
||||
logger.info("{} with {} successfully created", relationType, edgeProperties);
|
||||
|
||||
return edge;
|
||||
|
||||
} catch (ResourceRegistryException rre) {
|
||||
logger.error("Error Creating {} with {}", relationType, edgeProperties, rre);
|
||||
if (orientGraph!=null) {
|
||||
orientGraph.rollback();
|
||||
}
|
||||
throw rre;
|
||||
} catch (Exception e) {
|
||||
logger.error("Error Creating {} with {}", relationType, edgeProperties, e);
|
||||
if (orientGraph!=null) {
|
||||
orientGraph.rollback();
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue