HF-131 (6/7): thrown exceptions name the cell (issue #444) - #1766
marcin-kordas-hoc wants to merge 10 commits into
Conversation
Reading a formula cell's value before it has been computed used to throw a bare Error with no way to identify which cell caused it — the literal complaint in issue #444, open since 2020-07-07. Both vertex classes that can throw this (ScalarFormulaVertex and ArrayFormulaVertex, sibling classes in the same file) had the identical defect. CellValueNotComputedError carries the address as a field rather than only in prose, and is re-exported from the package (import block, HyperFormulaNS static, and the bottom export block in src/index.ts) so a consumer can catch it by type, not just by parsing the message. The message itself interpolates numeric sheet/row/col rather than A1-style notation: neither vertex class has access to the sheetIndexMapping that A1-conversion requires, so the field is the deliverable, not the prose. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Task linked: HF-131 Verbose and actionable formula error messages |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit da37522. Configure here.
|
|
||
| - A cell error read from another cell no longer reports the reading cell as its origin. Errors that come from a cell holding a static error value — a formula with a syntax error, or an error value entered directly — now report that cell's address instead of the address of whichever cell happened to read them first. [#131](https://github.com/handsontable/hyperformula/issues/131) | ||
| - A parsing error, an error value typed directly into a cell, and an error literal written into a formula are now attributed to `parser`, `user input`, or `literal` respectively, instead of being silently unattributed or (for a parsing error) reporting no address at all. `#SPILL!` errors now report the cell that failed to spill instead of no address. [#131](https://github.com/handsontable/hyperformula/issues/131) | ||
| - Reading a formula cell's value before it has been computed now throws a `CellValueNotComputedError` naming the cell's address, instead of a plain `Error` with no way to trace which cell caused it. [#444](https://github.com/handsontable/hyperformula/issues/444) |
There was a problem hiding this comment.
Changelog missing PR link
Low Severity
The new Unreleased changelog bullet ends with an issue link to #444 rather than a pull-request URL. New engine changelog entries need a [#NNNN](https://github.com/handsontable/hyperformula/pull/NNNN) PR link; an issue-only reference is not a substitute.
Triggered by learned rule: CHANGELOG bullets need a PR link
Reviewed by Cursor Bugbot for commit da37522. Configure here.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hyperformula-docs | 1879bbb | Commit Preview URL Branch Preview URL |
Sep 15 2026, 08:03 AM |
Performance comparison of head (1879bbb) vs base (e2ced02) |
…esses # Conflicts: # CHANGELOG.md
…ddresses # Conflicts: # CHANGELOG.md
…ddresses # Conflicts: # CHANGELOG.md
…ddresses # Conflicts: # CHANGELOG.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fix/hf-131-rootless-origin #1766 +/- ##
==============================================================
+ Coverage 97.43% 97.45% +0.01%
==============================================================
Files 195 195
Lines 15862 15868 +6
Branches 3500 3500
==============================================================
+ Hits 15455 15464 +9
+ Misses 399 396 -3
Partials 8 8
🚀 New features to boost your workflow:
|
Tobiadefami
left a comment
There was a problem hiding this comment.
The implementation looks good.


What and why
Stacked on #1765. Closes #444: reading
a formula cell's value before it has been computed threw a plain
Error('Value of the formula cell is not computed.')/Error('Array not computed yet.')— no way to trace which cell caused it.Adds
CellValueNotComputedError, a named, exported error class carrying the cell's address:Replaces both throw sites (
ScalarFormulaVertex.getCellValue,ArrayFormulaVertex.getCellValue).Exported from
src/index.ts, both as a named export and on theHyperFormulastatic namespace,alongside
CellError/DetailedCellError.Verified
npx tsc --noEmit— cleannpx eslint src/— 0 errorspre-existing branch-pinning mismatch as the rest of this stack
Stack
6 of 7 — stacked on #1765. Next:
docs/hf-131-types-of-errors.🤖 Generated with Claude Code
Note
Low Risk
Narrow change to error typing at two internal throw sites plus a new public export; callers that relied on exact generic
Errormessage strings may need to catchCellValueNotComputedErrorinstead.Overview
Reading a formula cell before evaluation used to throw anonymous plain
Errormessages (Value of the formula cell is not computed./Array not computed yet.), so callers could not identify which cell failed.This PR introduces
CellValueNotComputedErrorwith a publicaddressfield (SimpleCellAddress) and a message that includes sheet, row, and col.ScalarFormulaVertex.getCellValueandArrayFormulaVertex.getCellValuenow throw this type instead of generic errors.The class is exported from the package entry (named export and
HyperFormula.CellValueNotComputedErrorstatic), and the unreleased CHANGELOG documents the behavior change for issue #444.Reviewed by Cursor Bugbot for commit 1879bbb. Bugbot is set up for automated code reviews on this repo. Configure here.