Skip to content

fix: log previously-silenced exceptions instead of swallowing them (#9) - #7

Open
rsmxingu wants to merge 1 commit into
rsd:masterfrom
rsmxingu:fix/log-silenced-exceptions
Open

fix: log previously-silenced exceptions instead of swallowing them (#9)#7
rsmxingu wants to merge 1 commit into
rsd:masterfrom
rsmxingu:fix/log-silenced-exceptions

Conversation

@rsmxingu

Copy link
Copy Markdown

Problem

Several except ...: pass blocks discarded errors with no trace, making field diagnostics from yafw.log harder.

Changes

Replace silent passes with debug-level logging. These paths remain non-fatal; only observability changes.

  • ui.py — window-icon load failure now logs at debug (with traceback) instead of a bare pass. Added a module logger bound to the shared "yafw" logger (configured in processor.py) so UI diagnostics land in the same log file.
  • processor.py — the xdg-open shim symlink failure, and the four progress-line parsers (auto-editor analyze + cut; ffmpeg two-pass and single-pass out_time_us) now log the offending line/error at debug. The broad catch is kept on the progress parsers on purpose, so a single malformed line never aborts the progress loop.

Scope notes

  • The broad except in main.py's frozen-bundle binary copy is intentionally left as best-effort (no logger is configured in that bootstrap path; the download_binary monkeypatch is the real fallback). It is restructured separately in the main.py dedup PR.
  • Temp-file cleanup and process-teardown excepts are intentionally left silent — expected, benign cases.

Relationship to the other medium-priority PRs

This branch and the processor.py refactor PR both touch processor.py, but in disjoint regions (this one only in the progress loops / shim). I trial-merged all four medium-priority branches together locally: no conflicts, merged tree compiles, and tests/test_processor passes (14).

Testing

  • python3 -m py_compile ui.py processor.py passes.
  • python3 -m unittest tests.test_processor → 8 passed (unaffected).

🤖 Generated with Claude Code

Several `except ...: pass` blocks discarded errors with no trace, making field
diagnostics from yafw.log harder. Replace the silent passes with debug-level
logging (behavior is otherwise unchanged — these paths remain non-fatal):

- ui.py: window-icon load failure now logs at debug (with traceback) instead of
  a bare pass. Added a module logger bound to the shared "yafw" logger so UI
  diagnostics land in the same log file configured by processor.py.
- processor.py: the xdg-open shim symlink failure and the four progress-line
  parsers (auto-editor analyze/cut, ffmpeg two-pass and single-pass out_time_us)
  now log the offending line/error at debug. The broad catch is kept on the
  progress parsers on purpose so a single malformed line never aborts the
  progress loop.

Scope note: the broad except in main.py's frozen-bundle binary copy is left as
best-effort (no logger is configured in that bootstrap path; the download_binary
monkeypatch is the real fallback). Temp-file cleanup and process-teardown
excepts are also intentionally left silent as expected, benign cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant