Using the proper exception

This commit is contained in:
Luca Frosini 2021-03-08 09:08:25 +01:00
parent 5db160a2dc
commit 3a6f3cc59b
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ public abstract class EntityManagement<E extends Entity, ET extends EntityType>
String error = String.format(
"Trying to create an instance of %s of type %s which is abstract. The operation will be aborted.",
accessType.getName(), typeName);
throw new ResourceRegistryException(error);
throw new SchemaViolationException(error);
}
OVertex vertexEntity = oDatabaseDocument.newVertex(typeName);