Fixing specific exception management

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@148230 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2017-05-02 12:25:06 +00:00
parent 1498750f9e
commit e7d9986962
1 changed files with 2 additions and 7 deletions

View File

@ -96,7 +96,7 @@ public abstract class EntityManagement<E extends Entity> extends
String error = String.format(
"UUID %s is already used by another %s. This is not allowed.",
uuid.toString(), (el instanceof Vertex) ? Entity.NAME : Relation.NAME);
throw getSpecificERAlreadyPresentException(error);
throw getSpecificERAvailableInAnotherContextException(error);
}catch (ERNotFoundException e1) {
// OK the UUID is not already used.
@ -104,12 +104,7 @@ public abstract class EntityManagement<E extends Entity> extends
} catch (ERAvailableInAnotherContextException e) {
throw e;
}
/* Removed because the check if(uudi!=null) has beeen added
catch (Exception e) {
// no header or no header with uuid is provided and it is fine
}
*/
this.element = vertexEntity;
Header entityHeader = HeaderUtility.getHeader(jsonNode, true);