mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-12-22 06:03:09 -05:00
build: fix incorrect error handling in ZiglingStep.compile
When handling the error from the eval method, some possible errors are ignored. The make method will only print the exercise hint and the help message. Print the unexpected error message, in the else prong. Note that FileNotFound can also be considered unexpected.
This commit is contained in:
parent
27b941fdaf
commit
40cbee8fa2
1 changed files with 10 additions and 1 deletions
11
build.zig
11
build.zig
|
@ -395,7 +395,16 @@ const ZiglingStep = struct {
|
|||
for (argv) |v| print("{s} ", .{v});
|
||||
print("\n", .{});
|
||||
},
|
||||
else => {},
|
||||
else => {
|
||||
print("{s}{s}: Unexpected error: {s}{s}\n", .{
|
||||
red_text,
|
||||
self.exercise.main_file,
|
||||
@errorName(err),
|
||||
reset_text,
|
||||
});
|
||||
for (argv) |v| print("{s} ", .{v});
|
||||
print("\n", .{});
|
||||
},
|
||||
}
|
||||
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue