Skip to content

fix(history): add error logging to silent catch {} handlers#170

Merged
gHashTag merged 1 commit into
mainfrom
feat/issue-167
Mar 11, 2026
Merged

fix(history): add error logging to silent catch {} handlers#170
gHashTag merged 1 commit into
mainfrom
feat/issue-167

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Summary

  • Replace 3 silent catch {} handlers with proper error logging in src/tri/tri_history.zig
  • Use std.log.debug for consistency as specified in the issue

Changes

  • History.add(): log save errors instead of silently swallowing
  • ReplHistory.load(): log load errors instead of silently swallowing
  • ReplHistory.saveBeforeExit(): log save errors instead of silently swallowing

Test plan

  • zig test src/tri/tri_history.zig — All 5 tests pass
  • No empty catch {} handlers remaining in file
  • Each catch logs error name via std.log.debug

Closes #167

🤖 Generated with Claude Code

Replace empty catch {} handlers with proper error logging using
std.log.debug for consistency. This prevents persistence failures
from being silently swallowed.

Changes:
- History.add(): log save errors
- ReplHistory.load(): log load errors
- ReplHistory.saveBeforeExit(): log save errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gHashTag gHashTag merged commit fbf7aa7 into main Mar 11, 2026
5 of 6 checks passed
gHashTag added a commit that referenced this pull request Mar 18, 2026
fix(history): add error logging to silent catch {} handlers
@gHashTag gHashTag deleted the feat/issue-167 branch April 3, 2026 10:59
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.

fix(history): add error logging to silent catch {} handlers in tri_history.zig

1 participant