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;
@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);
}
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;