Skip to content

fix(utils): replace catch {} with error logging in tri_utils.zig#183

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

fix(utils): replace catch {} with error logging in tri_utils.zig#183
gHashTag merged 1 commit into
mainfrom
feat/issue-182

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Summary

  • Replace 4 silent catch {} blocks with proper error logging in src/tri/tri_utils.zig
  • Use std.log.debug since load failures on first run are expected (no existing files)

Changes

Line Operation Error Log Message
322 corpus.loadInto() "corpus load: {error}"
327 ctx_mgr.loadIndex() "context index load: {error}"
365 mgr.saveIndex() "context index save: {error}"
373 corpus.save() "corpus save: {error}"

Test Plan

  • zig fmt src/ passes
  • Changes verified in source file
  • Pre-existing build issues in other files (unrelated to this fix)

Closes #182

Replace silent error swallowing with debug logging for corpus and
context index operations. Using std.log.debug since load failures
on first run are expected (no existing files to load).

Affected lines:
- corpus.loadInto() at line 322
- ctx_mgr.loadIndex() at line 327
- mgr.saveIndex() at line 365
- corpus.save() at line 373

Closes #182
@gHashTag gHashTag merged commit 78e31d1 into main Mar 11, 2026
4 of 6 checks passed
gHashTag added a commit that referenced this pull request Mar 18, 2026
fix(utils): replace catch {} with error logging in tri_utils.zig
@gHashTag gHashTag deleted the feat/issue-182 branch April 3, 2026 11:00
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(utils): replace catch {} with error logging in tri_utils.zig corpus/index saves

1 participant