Compilation: fix not showing sub-errors for autodocs

This commit is contained in:
Andrew Kelley 2024-08-06 12:33:34 -07:00
parent 40edd11516
commit ff503edc04

View File

@ -4201,10 +4201,11 @@ fn workerDocsWasm(comp: *Compilation, parent_prog_node: std.Progress.Node) void
const prog_node = parent_prog_node.start("Compile Autodocs", 0);
defer prog_node.end();
workerDocsWasmFallible(comp, prog_node) catch |err| {
comp.lockAndSetMiscFailure(.docs_wasm, "unable to build autodocs: {s}", .{
workerDocsWasmFallible(comp, prog_node) catch |err| switch (err) {
error.SubCompilationFailed => return, // error reported already
else => comp.lockAndSetMiscFailure(.docs_wasm, "unable to build autodocs: {s}", .{
@errorName(err),
});
}),
};
}