authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-03-06 19:22:35-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-03-10 17:51:06-07:00
loged8ee3ddd377b7148ff4ea0a7606e0cb60e539d7
tree18e669d20ae9b4a1dd042a03d300800fa5044d38
parent6b84c8e04c9286d072367ae86807fd517c74c479

slightly better error name when wasm compilation fails


1 files changed, 4 insertions(+), 4 deletions(-)

lib/compiler/std-docs.zig+4-4
...@@ -327,7 +327,7 @@ fn buildWasmBinary(...@@ -327,7 +327,7 @@ fn buildWasmBinary(
327 "the following command exited with error code {d}:\n{s}",327 "the following command exited with error code {d}:\n{s}",
328 .{ code, try std.Build.Step.allocPrintCmd(arena, null, argv.items) },328 .{ code, try std.Build.Step.allocPrintCmd(arena, null, argv.items) },
329 );329 );
330 return error.AlreadyReported;330 return error.WasmCompilationFailed;
331 }331 }
332 },332 },
333 .Signal, .Stopped, .Unknown => {333 .Signal, .Stopped, .Unknown => {
...@@ -335,7 +335,7 @@ fn buildWasmBinary(...@@ -335,7 +335,7 @@ fn buildWasmBinary(
335 "the following command terminated unexpectedly:\n{s}",335 "the following command terminated unexpectedly:\n{s}",
336 .{try std.Build.Step.allocPrintCmd(arena, null, argv.items)},336 .{try std.Build.Step.allocPrintCmd(arena, null, argv.items)},
337 );337 );
338 return error.AlreadyReported;338 return error.WasmCompilationFailed;
339 },339 },
340 }340 }
341341
...@@ -346,14 +346,14 @@ fn buildWasmBinary(...@@ -346,14 +346,14 @@ fn buildWasmBinary(
346 result_error_bundle.errorMessageCount(),346 result_error_bundle.errorMessageCount(),
347 try std.Build.Step.allocPrintCmd(arena, null, argv.items),347 try std.Build.Step.allocPrintCmd(arena, null, argv.items),
348 });348 });
349 return error.AlreadyReported;349 return error.WasmCompilationFailed;
350 }350 }
351351
352 return result orelse {352 return result orelse {
353 std.log.err("child process failed to report result\n{s}", .{353 std.log.err("child process failed to report result\n{s}", .{
354 try std.Build.Step.allocPrintCmd(arena, null, argv.items),354 try std.Build.Step.allocPrintCmd(arena, null, argv.items),
355 });355 });
356 return error.AlreadyReported;356 return error.WasmCompilationFailed;
357 };357 };
358}358}
359359