Skip to content

Handle non-IndexError failures in graph and summary updates - #296

Merged
amanusk merged 1 commit into
amanusk:masterfrom
Sanjays2402:fix/graph-summary-update-error-handling
Aug 5, 2026
Merged

Handle non-IndexError failures in graph and summary updates#296
amanusk merged 1 commit into
amanusk:masterfrom
Sanjays2402:fix/graph-summary-update-error-handling

Conversation

@Sanjays2402

Copy link
Copy Markdown
Contributor

Closes #258.

update_displayed_information() catches any recoverable exception from source.update(), but the graph and summary loops only caught IndexError, so a TypeError/ValueError/OSError raised while a widget redrew propagated out of the urwid alarm callback and killed the app. Both loops now follow the same policy as the source loop: log and continue in normal runtime, re-raise in debug mode.

New tests/test_view_update_errors.py fails 6/7 without the change and passes 7/7 with it.

update_displayed_information() guards source.update() against any
recoverable exception, but the graph and summary rendering loops only
caught IndexError. Any other exception raised while a widget redrew
(TypeError/ValueError/OSError from a shape mismatch or transient UI
state) propagated out of the urwid alarm callback and terminated the
application.

Both loops now apply the same policy already used for source updates:
log and continue in normal runtime, re-raise in debug mode.

Adds tests/test_view_update_errors.py covering both loops for
TypeError/ValueError/OSError plus the debug-mode re-raise.

Closes amanusk#258
@amanusk
amanusk merged commit 40c1db5 into amanusk:master Aug 5, 2026
10 of 11 checks passed
@amanusk

amanusk commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Thanks for the fix.
Merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-up: unify runtime error handling for graph/summary updates

2 participants