1 package org.simantics.spreadsheet.graph.formula;
3 import org.simantics.spreadsheet.graph.CellFormulaFunction;
4 import org.simantics.spreadsheet.graph.CellValueVisitor;
5 import org.simantics.spreadsheet.graph.parser.ast.AstArgList;
7 public class IsErrorFormulaFunction implements CellFormulaFunction<Object>{
10 public Object evaluate(CellValueVisitor visitor, AstArgList args) {
12 if (args.values.size() != 1) throw new IllegalStateException();
14 Object condition = args.values.get(0).accept(visitor);
15 if(condition instanceof String){
16 FormulaError2 error = FormulaError2.forString((String)condition);