X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FStandardGraphPropertyVariable.java;fp=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FStandardGraphPropertyVariable.java;h=2dcb6e00ab08871f296c7af6d5a498115edf7d60;hb=321607bdbd3ca800128d40b5511092f71cb66367;hp=582277c905bbcbd19a2a1308021f5f71c66510f6;hpb=e18cdb01663e3ebdae25e66bf158348bbf823a07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java index 582277c90..2dcb6e00a 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java @@ -17,10 +17,12 @@ import org.simantics.db.WriteGraph; import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener; import org.simantics.db.common.validation.L0Validations; import org.simantics.db.exception.DatabaseException; +import org.simantics.db.exception.DatatypeNotFoundException; import org.simantics.db.exception.ValidationException; +import org.simantics.db.exception.VariableException; +import org.simantics.db.layer0.exception.InvalidVariableException; import org.simantics.db.layer0.exception.MissingVariableValueException; import org.simantics.db.layer0.exception.PendingVariableException; -import org.simantics.db.layer0.exception.VariableException; import org.simantics.db.layer0.function.All; import org.simantics.db.layer0.request.PropertyInfo; import org.simantics.db.layer0.request.PropertyInfoRequest; @@ -159,7 +161,7 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable { @Override public Resource getRepresents(ReadGraph graph) throws DatabaseException { if(represents == null) - throw new VariableException("Variable is not represented by any resource (URI=" + getPossibleURI(graph) + ")."); + throw new InvalidVariableException("Variable is not represented by any resource (URI=" + getPossibleURI(graph) + ")."); return represents; // return graph.getSingleObject(parentResource, property.predicate); } @@ -233,9 +235,9 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable { if (type == null) { String uri = this.getPossibleURI(graph); if (uri != null) - throw new DatabaseException("No data type for " + uri); + throw new DatatypeNotFoundException("No data type for " + uri); else - throw new DatabaseException("No data type for " + this.getIdentifier()); + throw new DatatypeNotFoundException("No data type for " + this.getIdentifier()); } return type;