Skip to content

fix(cmd): replace catch {} with error logging in command_interface.zig #181

@gHashTag

Description

@gHashTag

Task

In src/tri/command_interface.zig, lines 179 and 247 silently swallow errors:

result.append(cmd) catch {};        // line 179
result.append(toMcpTool(cmd)) catch {};  // line 247

These are ArrayList append failures — likely OOM. They should log.

Fix

Replace each catch {} with:

result.append(cmd) catch |err| {
    std.log.warn("command append failed: {s}", .{@errorName(err)});
};

Same pattern for line 247.

File

  • src/tri/command_interface.zig — lines 179, 247

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