\r
@Override\r
public String validateUnits(ReadGraph graph, SysdynModel model) {\r
- try {\r
- return UnitUtils.matchUnits(graph, model, parent.getParentConfiguration(), parent.getUnit(), getExpression());\r
- } catch (TokenMgrError e) {\r
- return e.getMessage();\r
- }\r
+ return UnitUtils.matchUnits(graph, model, parent.getParentConfiguration(), parent.getUnit(), getExpression());\r
}\r
\r
@Override\r
import org.simantics.sysdyn.representation.Shadow;\r
import org.simantics.sysdyn.representation.Variable;\r
import org.simantics.sysdyn.unitParser.ParseException;\r
+import org.simantics.sysdyn.unitParser.TokenMgrError;\r
import org.simantics.sysdyn.unitParser.UnitCheckingException;\r
import org.simantics.sysdyn.unitParser.UnitCheckingNode;\r
import org.simantics.sysdyn.unitParser.UnitParser;\r
}\r
} catch (ParseException e) {\r
return "Cannot validate units: Syntax error in expression.";\r
+ } catch (TokenMgrError e) {\r
+ return "Cannot validate units: Syntax error in expression.";\r
}\r
return null;\r
}\r