| author | |
| committer | |
| log | 4593a0dc2edf8145422f3efdf1c09304046f0d98 |
| tree | 0c05eee9dce24d22a244a271155ff59c5006db24 |
| parent | f69891797a831adfeaccaa352ffc8464f6fc3dbd |
2 files changed, 8 insertions(+), 8 deletions(-)
lib/std/Build/Step/Run.zig+2-4| ... | ... | @@ -1385,14 +1385,12 @@ fn runCommand( |
| 1385 | 1385 | break :term spawnChildAndCollect(run, interp_argv.items, &environ_map, has_side_effects, options, fuzz_context) catch |e| { |
| 1386 | 1386 | if (!run.failing_to_execute_foreign_is_an_error) return error.MakeSkipped; |
| 1387 | 1387 | if (e == error.MakeFailed) return error.MakeFailed; // error already reported |
| 1388 | return step.fail("unable to spawn interpreter {s}: {s}", .{ | |
| 1389 | interp_argv.items[0], @errorName(e), | |
| 1390 | }); | |
| 1388 | return step.fail("unable to spawn interpreter {s}: {t}", .{ interp_argv.items[0], e }); | |
| 1391 | 1389 | }; |
| 1392 | 1390 | } |
| 1393 | 1391 | if (err == error.MakeFailed) return error.MakeFailed; // error already reported |
| 1394 | 1392 | |
| 1395 | return step.fail("failed to spawn and capture stdio from {s}: {s}", .{ argv[0], @errorName(err) }); | |
| 1393 | return step.fail("failed to spawn and capture stdio from {s}: {t}", .{ argv[0], err }); | |
| 1396 | 1394 | }; |
| 1397 | 1395 | |
| 1398 | 1396 | const generic_result = opt_generic_result orelse { |
lib/std/Io/File/MultiReader.zig+6-4| ... | ... | @@ -17,7 +17,8 @@ pub const Context = struct { |
| 17 | 17 | err: ?Error, |
| 18 | 18 | }; |
| 19 | 19 | |
| 20 | pub const Error = Allocator.Error || File.ReadStreamingError || Io.ConcurrentError; | |
| 20 | pub const Error = UnendingError || error{EndOfStream}; | |
| 21 | pub const UnendingError = Allocator.Error || File.Reader.Error || Io.ConcurrentError; | |
| 21 | 22 | |
| 22 | 23 | /// Trailing: |
| 23 | 24 | /// * `contexts: [len]Context` |
| ... | ... | @@ -126,13 +127,14 @@ pub fn reader(mr: *MultiReader, index: usize) *Io.Reader { |
| 126 | 127 | } |
| 127 | 128 | |
| 128 | 129 | /// Checks for errors in all streams, prioritizing `error.Canceled` if it |
| 129 | /// occurred anywhere. | |
| 130 | pub fn checkAnyError(mr: *const MultiReader) Error!void { | |
| 130 | /// occurred anywhere, and ignoring `error.EndOfStream`. | |
| 131 | pub fn checkAnyError(mr: *const MultiReader) UnendingError!void { | |
| 131 | 132 | const contexts = mr.streams.contexts(); |
| 132 | var other: Error!void = {}; | |
| 133 | var other: UnendingError!void = {}; | |
| 133 | 134 | for (contexts) |*context| { |
| 134 | 135 | if (context.err) |err| switch (err) { |
| 135 | 136 | error.Canceled => |e| return e, |
| 137 | error.EndOfStream => continue, | |
| 136 | 138 | else => |e| other = e, |
| 137 | 139 | }; |
| 138 | 140 | } |