Improved error message

This commit is contained in:
Luca Frosini 2021-03-02 16:19:29 +01:00
parent eb0a6f213d
commit 951aa750e1
1 changed files with 2 additions and 2 deletions

View File

@ -125,12 +125,12 @@ public class FacetManagement extends EntityManagement<Facet, FacetType> {
@Override
public String create() throws AlreadyPresentException, ResourceRegistryException {
throw new ResourceRegistryException("You cannot create an horphan Facet");
throw new SchemaViolationException("You cannot create a stand alone Facet");
}
public OVertex internalCreate() throws AlreadyPresentException, ResourceRegistryException {
if(entryPoint && operation == Operation.CREATE) {
throw new ResourceRegistryException("You cannot create an horphan Facet");
throw new SchemaViolationException("You cannot create a stand alone Facet");
}
return super.internalCreate();
}