X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FStandardRVIResolver.java;fp=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FStandardRVIResolver.java;h=7c7ba292d851d8bfde2cbf1f13d2fe3713885848;hb=321607bdbd3ca800128d40b5511092f71cb66367;hp=b01aeb32b3c810c6347b96aa01bb6bc2e8feb41c;hpb=e18cdb01663e3ebdae25e66bf158348bbf823a07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardRVIResolver.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardRVIResolver.java index b01aeb32b..7c7ba292d 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardRVIResolver.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardRVIResolver.java @@ -40,7 +40,7 @@ public class StandardRVIResolver implements RVIResolver { 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(); @@ -90,7 +90,7 @@ public class StandardRVIResolver implements RVIResolver { 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 { @@ -102,7 +102,7 @@ public class StandardRVIResolver implements RVIResolver { return child; } } - throw new DatabaseException("Could not resolve property " + part); + throw new MissingVariableException("Could not resolve property " + part, variable.getPossibleRepresents(graph)); } @Override @@ -120,7 +120,7 @@ public class StandardRVIResolver implements RVIResolver { 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)); } }