fix: log previously-silenced exceptions instead of swallowing them (#9) - #7
Open
rsmxingu wants to merge 1 commit into
Open
fix: log previously-silenced exceptions instead of swallowing them (#9)#7rsmxingu wants to merge 1 commit into
rsmxingu wants to merge 1 commit into
Conversation
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>
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.
Problem
Several
except ...: passblocks discarded errors with no trace, making field diagnostics fromyafw.logharder.Changes
Replace silent passes with debug-level logging. These paths remain non-fatal; only observability changes.
pass. Added a module logger bound to the shared"yafw"logger (configured inprocessor.py) so UI diagnostics land in the same log file.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
main.py's frozen-bundle binary copy is intentionally left as best-effort (no logger is configured in that bootstrap path; thedownload_binarymonkeypatch is the real fallback). It is restructured separately in themain.pydedup PR.Relationship to the other medium-priority PRs
This branch and the
processor.pyrefactor PR both touchprocessor.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, andtests/test_processorpasses (14).Testing
python3 -m py_compile ui.py processor.pypasses.python3 -m unittest tests.test_processor→ 8 passed (unaffected).🤖 Generated with Claude Code