Task
In src/tri/tri_utils.zig, lines 322, 327, 365, 373 silently swallow errors on corpus/index operations:
corpus.loadInto(TVC_CORPUS_PATH) catch {}; // line 322
ctx_mgr.loadIndex() catch {}; // line 327
mgr.saveIndex() catch {}; // line 365
corpus.save(TVC_CORPUS_PATH) catch {}; // line 373
These are file I/O operations that can fail for real reasons (disk full, permissions, etc).
Fix
Replace each with error logging:
corpus.loadInto(TVC_CORPUS_PATH) catch |err| {
std.log.debug("corpus load: {s}", .{@errorName(err)});
};
Same pattern for all 4 instances. Use std.log.debug since load failures on first run are expected.
File
src/tri/tri_utils.zig — lines 322, 327, 365, 373
Acceptance
zig build compiles without errors
zig fmt passes
- All 4
catch {} replaced with error logging
Task
In
src/tri/tri_utils.zig, lines 322, 327, 365, 373 silently swallow errors on corpus/index operations:These are file I/O operations that can fail for real reasons (disk full, permissions, etc).
Fix
Replace each with error logging:
Same pattern for all 4 instances. Use
std.log.debugsince load failures on first run are expected.File
src/tri/tri_utils.zig— lines 322, 327, 365, 373Acceptance
zig buildcompiles without errorszig fmtpassescatch {}replaced with error logging