Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
da37522
HF-131: name the cell in the not-computed error (#444)
marcin-kordas-hoc Sep 8, 2026
89f913e
Merge remote-tracking branch 'pr5/tip' into fix/hf-131-issue-444-addr…
marcin-kordas-hoc Sep 11, 2026
d56bd3d
Merge remote-tracking branch 'pr5/tip2' into fix/hf-131-issue-444-add…
marcin-kordas-hoc Sep 11, 2026
c884f5c
Merge branch 'fix/hf-131-rootless-origin' into fix/hf-131-issue-444-a…
marcin-kordas-hoc Sep 14, 2026
7efd085
Merge branch 'fix/hf-131-rootless-origin' into fix/hf-131-issue-444-a…
marcin-kordas-hoc Sep 14, 2026
4c04a8e
Merge branch 'fix/hf-131-rootless-origin' into fix/hf-131-issue-444-a…
marcin-kordas-hoc Sep 14, 2026
fb2cf29
Merge branch 'fix/hf-131-rootless-origin' into fix/hf-131-issue-444-a…
marcin-kordas-hoc Sep 14, 2026
fb54232
Merge branch 'fix/hf-131-rootless-origin' into fix/hf-131-issue-444-a…
marcin-kordas-hoc Sep 14, 2026
5c78d85
Merge branch 'fix/hf-131-rootless-origin' into fix/hf-131-issue-444-a…
marcin-kordas-hoc Sep 15, 2026
1879bbb
Merge branch 'fix/hf-131-rootless-origin' into fix/hf-131-issue-444-a…
marcin-kordas-hoc Sep 15, 2026
87cb6bc
docs: describe CellValueNotComputedError without an issue reference
marcin-kordas-hoc Oct 22, 2026
e63a22b
Merge fix/hf-131-rootless-origin into fix/hf-131-issue-444-addresses
marcin-kordas-hoc Oct 22, 2026
2000842
Merge fix/hf-131-rootless-origin into fix/hf-131-issue-444-addresses
marcin-kordas-hoc Oct 23, 2026
d244d3a
HF-131: Start the changelog entry for the not-computed error with the…
marcin-kordas-hoc Oct 23, 2026
285729a
Merge fix/hf-131-rootless-origin into fix/hf-131-issue-444-addresses
marcin-kordas-hoc Oct 23, 2026
a95916b
Merge fix/hf-131-rootless-origin into fix/hf-131-issue-444-addresses
marcin-kordas-hoc Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fixed the `EDATE` function returning the 28th of February instead of the 29th when the shifted date falls in February of a leap year (e.g. `=EDATE(DATE(2028, 1, 31), 1)` now returns `2028-02-29` instead of `2028-02-28`). [#1781](https://github.com/handsontable/hyperformula/pull/1781)
- Fixed a cell holding a static error value, such as a rejected formula or a typed-in error, being reported under the address of the cell that read it first instead of its own address. [#1547](https://github.com/handsontable/hyperformula/issues/1547)
- Fixed `#SPILL!` errors reporting no address; their `address` is now the cell whose array result could not spill. [#1547](https://github.com/handsontable/hyperformula/issues/1547)
- Fixed reading a formula cell's value before it was computed throwing a plain `Error` that did not say which cell it was; it now throws `CellValueNotComputedError`, which carries the cell's address. [#444](https://github.com/handsontable/hyperformula/issues/444)

## [3.5.0] - 2026-10-09

Expand Down
5 changes: 3 additions & 2 deletions hyperformula/src/DependencyGraph/FormulaVertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {ArrayValue, ErroredArray, CellArray, NotComputedArray} from '../ArrayVal
import {CellError, equalSimpleCellAddress, ErrorType, SimpleCellAddress} from '../Cell'
import {RawCellContent} from '../CellContentParser'
import {ErrorMessage} from '../error-message'
import {CellValueNotComputedError} from '../errors'
import {EmptyValue, getRawValue, InternalScalarValue, InterpreterValue} from '../interpreter/InterpreterValue'
import {LazilyTransformingAstService} from '../LazilyTransformingAstService'
import {Maybe} from '../Maybe'
Expand Down Expand Up @@ -136,7 +137,7 @@ export class ArrayFormulaVertex extends FormulaVertex {

getCellValue(): InterpreterValue {
if (this.array instanceof NotComputedArray) {
throw Error('Array not computed yet.')
throw new CellValueNotComputedError(this.cellAddress)
}
return this.array.simpleRangeValue()
}
Expand Down Expand Up @@ -275,7 +276,7 @@ export class ScalarFormulaVertex extends FormulaVertex {
if (this.cachedCellValue !== undefined) {
return this.cachedCellValue
} else {
throw Error('Value of the formula cell is not computed.')
throw new CellValueNotComputedError(this.cellAddress)
}
}

Expand Down
13 changes: 13 additions & 0 deletions hyperformula/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ export class InvalidAddressError extends Error {
}
}

/**
* Error thrown when a formula cell's value is read before it has been computed.
*
* Carries the address as a field, so callers can trace the cell without parsing
* it back out of the message.
* Thrown by both ScalarFormulaVertex and ArrayFormulaVertex.
*/
export class CellValueNotComputedError extends Error {
constructor(public readonly address: SimpleCellAddress) {
super(`Value of the formula cell (sheet = ${address.sheet}, row = ${address.row}, col = ${address.col}) is not computed.`)
}
}

/**
* Error thrown when the given arguments are invalid
*/
Expand Down
3 changes: 3 additions & 0 deletions hyperformula/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
DenseSparseChooseBasedOnThreshold
} from './DependencyGraph/AddressMapping/ChooseAddressMappingPolicy'
import {
CellValueNotComputedError,
ConfigValueTooBigError,
ConfigValueTooSmallError,
EvaluationSuspendedError,
Expand Down Expand Up @@ -74,6 +75,7 @@ class HyperFormulaNS extends HyperFormula {
public static DetailedCellError = DetailedCellError
public static ExportedCellChange = ExportedCellChange
public static ExportedNamedExpressionChange = ExportedNamedExpressionChange
public static CellValueNotComputedError = CellValueNotComputedError
public static ConfigValueTooBigError = ConfigValueTooBigError
public static ConfigValueTooSmallError = ConfigValueTooSmallError
public static EvaluationSuspendedError = EvaluationSuspendedError
Expand Down Expand Up @@ -159,6 +161,7 @@ export {
ExportedNamedExpressionChange,
DetailedCellError,
CellError,
CellValueNotComputedError,
ConfigValueTooBigError,
ConfigValueTooSmallError,
EvaluationSuspendedError,
Expand Down
Loading