Newbie: idiom to add information to error

This is commonly referred to as the “Diagnostics” pattern. There are several examples in Zig’s stdlib. Here’s one for std.json: std.json.Diagnostics.

3 Likes