Fixed exception management
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@146436 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
290ce6ac90
commit
a95d369ba2
|
@ -92,9 +92,6 @@ public abstract class ERManagement<ERType extends ER, El extends Element> {
|
|||
protected Class<El> elementClass;
|
||||
protected AccessType accessType;
|
||||
|
||||
//protected Class<ERType> erTypeClass;
|
||||
//protected String baseType;
|
||||
|
||||
protected OrientGraph orientGraph;
|
||||
|
||||
protected UUID uuid;
|
||||
|
@ -346,13 +343,17 @@ public abstract class ERManagement<ERType extends ER, El extends Element> {
|
|||
throws ERNotFoundException {
|
||||
|
||||
switch (accessType) {
|
||||
|
||||
case RESOURCE:
|
||||
throw new ResourceNotFoundException(e);
|
||||
|
||||
case FACET:
|
||||
throw new FacetNotFoundException(e);
|
||||
|
||||
case RELATION:
|
||||
case IS_RELATED_TO:
|
||||
throw new RelationNotFoundException(e);
|
||||
|
||||
case CONSISTS_OF:
|
||||
throw new RelationNotFoundException(e);
|
||||
|
||||
default:
|
||||
|
@ -373,9 +374,12 @@ public abstract class ERManagement<ERType extends ER, El extends Element> {
|
|||
case FACET:
|
||||
throw new FacetAvailableInAnotherContextException(e);
|
||||
|
||||
case RELATION:
|
||||
case IS_RELATED_TO:
|
||||
throw new RelationAvailableInAnotherContextException(e);
|
||||
|
||||
case CONSISTS_OF:
|
||||
throw new RelationAvailableInAnotherContextException(e);
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue