Skip to content

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

@amanusk

Description

@amanusk

Context

Recent runtime-hardening changes added robust exception handling around source.update() in GraphView.update_displayed_information().

That preserves the intended behavior:

  • normal runtime should not crash on transient sensor/source errors
  • debug mode can re-raise unexpected exceptions for diagnosis

Remaining risk (follow-up)

graph.update() and summary.update() currently only catch IndexError.

This means any other exception type raised by graph/summary rendering paths can still terminate the app in normal runtime, even though source update failures are now guarded.

Why this matters

The intended app-level property is: runtime failures should not crash the whole app (except when explicitly debugging).

Current implementation is close, but not fully consistent across update stages.

Potential failure modes

  • graph.update() raises non-IndexError (e.g. TypeError, ValueError, RuntimeError) due to shape mismatch or transient UI state
  • summary.update() raises non-IndexError from unexpected source/summary payload shape
  • one widget exception aborts the full refresh loop and exits app

Proposed follow-up PR scope

  1. Apply the same error-handling policy used for source.update() to graph/summary updates:
    • in normal runtime: log and continue
    • in debug/debug_run: raise unexpected exceptions
  2. Add targeted tests for non-IndexError exceptions in graph/summary update paths
  3. Keep logging signal high (avoid spam with repeat suppression / recovery logs if needed)

Notes

Not addressed in the current PR by design, to keep scope focused on psutil/fan crash fixes (#255/#256).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions