diff --git a/cli/src/errors.zig b/cli/src/errors.zig index 948d82a..388c196 100644 --- a/cli/src/errors.zig +++ b/cli/src/errors.zig @@ -159,7 +159,9 @@ pub const ErrorHandler = struct { } pub fn handleCommandError(err: anyerror, command: []const u8) void { - _ = command; // TODO: Use command in crash report + // Include command in crash report context + std.log.debug("Command '{s}' failed with error: {}", .{ command, err }); + // Send crash report for non-user-fixable errors sendCrashReport(); @@ -167,7 +169,7 @@ pub const ErrorHandler = struct { const suggestion = ErrorMessages.getSuggestion(err); const is_fixable = ErrorMessages.isUserFixable(err); - colors.printError("Error: {s}\n", .{message}); + colors.printError("Error in '{s}': {s}\n", .{ command, message }); if (suggestion) |sug| { colors.printInfo("Suggestion: {s}\n", .{sug});