mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
distinguish between unexpected child process exit code and unclean exit
This modifies the error for an unexpected exit code from the ChildProcess of RunStep to be UnexpectedExitCode rather than UncleanExit. This allows the handler of the error to distinguish between an error reported by the ChildProcess, and an error executing the ChildProcess, which is an important dinstinction when it comes to know what information to report to the user. For example, if you have a ChildProcess that you know reports its own errors, an unexpected exit code would mean the error is already reported, but an unclean exit would mean that child process was not able to report any error.
This commit is contained in:
parent
a0e195120d
commit
da2b615efb
@ -229,7 +229,7 @@ fn make(step: *Step) !void {
|
||||
printCmd(cwd, argv);
|
||||
}
|
||||
|
||||
return error.UncleanExit;
|
||||
return error.UnexpectedExitCode;
|
||||
}
|
||||
},
|
||||
else => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user