Variable parent = variable.getParent(graph);
if (parent == null)
// TODO: consider using a more suitable exception here to better convey the situation.
- throw new MissingVariableException("no parent for variable " + variable + " (URI=" + variable.getURI(graph) + ")");
+ throw new MissingVariableException("no parent for variable " + variable + " (URI=" + variable.getURI(graph) + ")", variable.getPossibleRepresents(graph));
RVI base = graph.syncRequest(new VariableRVIRequest(parent));
RVIPart part = getRVIPart(graph, variable);
return new RVIBuilder(base).append(part).toRVI();
return child;
}
}
- throw new DatabaseException("Could not resolve child " + part);
+ throw new MissingVariableException("Could not resolve child " + part, variable.getPossibleRepresents(graph));
}
public static Variable resolvePropertyDefault(ReadGraph graph, Variable variable, GuidRVIPart part) throws DatabaseException {
return child;
}
}
- throw new DatabaseException("Could not resolve property " + part);
+ throw new MissingVariableException("Could not resolve property " + part, variable.getPossibleRepresents(graph));
}
@Override
if(Role.CHILD.equals(grp.getRole())) return resolveChild(graph, context, grp);
else if(Role.PROPERTY.equals(grp.getRole())) return resolveProperty(graph, context, grp);
}
- throw new DatabaseException("Unrecognized RVIPart: " + part);
+ throw new MissingVariableException("Unrecognized RVIPart: " + part, context.getPossibleRepresents(graph));
}
}