fix: add logging to silent try-catch blocks#234
Merged
codebutler merged 1 commit intomasterfrom Feb 17, 2026
Merged
Conversation
Add println() diagnostics to ~30 catch blocks that previously swallowed exceptions silently, making debugging impossible. Each log message includes a component tag (e.g. [ISO7816], [CEPAS], [MdST]) and the exception details. Categories of changes: - ViewModels: log + stacktrace when card/key loading fails - MdST station reader: log parse and decode failures - LocalStorage persisters: log deserialization failures - Transit factories: log identity/metadata parse failures - ISO7816 card reader: log record, binary, balance, and file read failures - ISO7816 protocol: log unexpected errors in selectByName - ISO7816 TLV: log recursive build and decode failures - CEPAS protocol: log purse and history read failures - FeliCa adapters: log transceive failures - Vicinity reader: log system info read failures - KSX6924: log hex date/datetime parse failures Catch blocks that are legitimately silent (protocol probing, resource cleanup, expected card detection failures) are left unchanged. Co-Authored-By: Claude Opus 4.6 <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.
Summary
println()diagnostics to ~30 catch blocks across 18 files that previously swallowed exceptions silently[ISO7816],[CEPAS],[MdST]) and exception details for easy filteringFiles changed
ViewModels: HistoryViewModel, KeysViewModel — log + stacktrace on card/key loading failures
MdST reader: station decode and header parse failures
LocalStorage persisters: deserialization failures (web)
Transit factories: Leap identity, ERG metadata, China hex date parse failures
ISO7816: card reader (records, binary, balance, KSX6924), protocol, TLV decode
CEPAS: purse and history read failures
FeliCa: PCSC and PN533 transceive failures
Other: Vicinity system info, KSX6924 date parsing, ISO7816Dispatcher, MetrodroidJsonParser
Test plan
./gradlew assemble)./gradlew allTests)🤖 Generated with Claude Code