[]
An ErrorNode represents an error literal in a formula syntax tree.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("IFERROR(A2/A3, #DIV/0!)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
ErrorNode errorNode = (ErrorNode) functionNode.getChildren().get(1);
CalcError error = errorNode.getValue();
getChildrenThis method returns the CalcError that represents the error literal associated with this ErrorNode.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("IFERROR(A2/A3, #DIV/0!)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
ErrorNode errorNode = (ErrorNode) functionNode.getChildren().get(1);
CalcError error = errorNode.getValue();
CalcError value of this node.This method updates the CalcError that represents the error literal associated with this ErrorNode.
ErrorNode node = new ErrorNode(CalcError.Div0);
node.setValue(CalcError.Name);
CalcError error = node.getValue();
value - The error value to store in the node. Must be a defined CalcError value and must not be null.IllegalArgumentException - if value is not a defined CalcError value.