An error value of a formula. Formulas never throw: a cell shows the FormulaErrorCode (toString()), the table adds the CSS class ge-table-cell-error and shows the message as tooltip. Errors propagate through operators and functions ([a] / 0 + 1 → #DIV/0!), IFERROR(x, fallback) catches them, aggregators skip them.

Example

const result = compileFormula("[price] / [quantity]").evaluate({ price: 10, quantity: 0 });
if (isFormulaError(result)) {
console.log(result.code, result.message); // "#DIV/0!" "Division by zero"
}

Since

1.1.95

Hierarchy

  • FormulaError

Constructors

Properties

Methods

Constructors

Properties

the code shown in the cell

message: string

a short English explanation (tooltip); never contains HTML

position?: number

for syntax errors: the position in the formula text (0-based)

type: "FormulaError" = "FormulaError"

Marker (works across copies of the core): isFormulaError.

Methods