~subsetpark/erasmus

0deae02e185c0ab5324c9e8ecc3a7be1ab4a89ea — Zach Smith 2 months ago 516aa62
Output line error
1 files changed, 14 insertions(+), 1 deletions(-)

M src/main.zig
M src/main.zig => src/main.zig +14 -1
@@ 32,7 32,20 @@ fn readBody(entry_name: []const u8, contents: *util.CharBuffer) !void {

    while (true) {
        var buf: [max_line_length]u8 = undefined;
        var maybe_line = try util.nextLine(reader, &buf);
        var maybe_line = util.nextLine(reader, &buf) catch |err| {
            switch (err) {
                error.StreamTooLong => {
                    std.debug.print(
                        "[{s}] Read error. Maximum line length: {d}\n",
                        .{ entry_name, max_line_length },
                    );
                    return err;
                },
                else => {
                    return err;
                },
            }
        };
        if (maybe_line) |line| {
            if (line.len > util.ref_prefix.len and mem.eql(
                u8,