From 3a6f3cc59b6ec91a7c4c572674ebad84742e169c Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 8 Mar 2021 09:08:25 +0100 Subject: [PATCH] Using the proper exception --- .../instances/model/entities/EntityManagement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/entities/EntityManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/entities/EntityManagement.java index f33cb2d..3b0fe2a 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/entities/EntityManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/model/entities/EntityManagement.java @@ -250,7 +250,7 @@ public abstract class EntityManagement 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);