]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.spreadsheet.graph/src/org/simantics/spreadsheet/graph/SpreadsheetGraphUtils.java
Bugfixing sheets
[simantics/platform.git] / bundles / org.simantics.spreadsheet.graph / src / org / simantics / spreadsheet / graph / SpreadsheetGraphUtils.java
index ee57745ae857bf6bdf4cfd46ce6b0bba87364c2a..51f292929c440ff6bde32142ec34222633ad565e 100644 (file)
@@ -551,6 +551,7 @@ public class SpreadsheetGraphUtils {
                     Variable contextVariable = Variables.getVariable(graph, parameter);
                     Variable configVariable = Variables.getVariable(graph, parameter2);
                     Variable activeVariable = Variables.switchPossibleContext(graph, configVariable, contextVariable.getRepresents(graph));
+                    if(activeVariable == null) return Variant.ofInstance("Could not resolve " + configVariable.getURI(graph) + " for " + contextVariable.getURI(graph));
                     return activeVariable.getVariantValue(graph);
                 }
             }, new Listener<Variant>() {
@@ -562,7 +563,7 @@ public class SpreadsheetGraphUtils {
 
                 @Override
                 public void exception(Throwable t) {
-                    LOGGER.error("Error while evaluating variable value", t);
+                    LOGGER.error("Error while evaluating variable value, context = " + context + " uri=" + uri, t);
                 }
 
                 @Override