HF-131 (6/7): thrown exceptions name the cell (issue #444) - #1766
Open
marcin-kordas-hoc wants to merge 10 commits into
Open
marcin-kordas-hoc wants to merge 10 commits into
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>
Contributor
|
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.
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
reviewed
Sep 21, 2026
Tobiadefami
left a comment
Collaborator
There was a problem hiding this comment.
The implementation looks good.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.