Skip to content

Commit 49dfb82

Browse files
authored
Merge pull request #184 from gHashTag/feat/issue-181
fix(cmd): replace catch {} with error logging in command_interface.zig
2 parents 78e31d1 + 5f781cf commit 49dfb82

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/tri/command_interface.zig

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ pub fn listCategory(category: CommandCategory) []const CommandMetadata {
176176

177177
for (registry.items) |cmd| {
178178
if (std.mem.eql(u8, cmd.category, cat_str)) {
179-
result.append(cmd) catch {};
179+
result.append(cmd) catch |err| {
180+
std.log.warn("command append failed: {s}", .{@errorName(err)});
181+
};
180182
}
181183
}
182184

@@ -244,7 +246,9 @@ pub fn listMcpTools() []const McpToolSchema {
244246

245247
for (registry.items) |cmd| {
246248
if (cmd.mcp_enabled) {
247-
result.append(toMcpTool(cmd)) catch {};
249+
result.append(toMcpTool(cmd)) catch |err| {
250+
std.log.warn("MCP tool append failed: {s}", .{@errorName(err)});
251+
};
248252
}
249253
}
250254

0 commit comments

Comments
 (0)