Skip to content

fix(research): add error logging to catch {} handlers in tri_research.zig #177

@gHashTag

Description

@gHashTag

Task

In src/tri/tri_research.zig, lines 263 and 266 silently swallow errors:

std.fs.cwd().makePath(CACHE_DIR) catch {};    // line 263
file.writeAll(answer) catch {};                // line 266

Fix

Replace with error logging:

std.fs.cwd().makePath(CACHE_DIR) catch |err| {
    std.log.warn("failed to create cache dir: {s}", .{@errorName(err)});
};
file.writeAll(answer) catch |err| {
    std.log.warn("failed to write cache: {s}", .{@errorName(err)});
};

File

  • src/tri/tri_research.zig — lines 263, 266

Acceptance

  • zig build compiles without errors
  • zig fmt passes
  • No empty catch {} in this file

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:spawnAuto-spawn agent container

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions