diff --git a/doc/langref.html.in b/doc/langref.html.in index 9f32e05896e3eccf237f6388b79198f65c90a0b8..1974d76791234254c570e2fcdf5e3339748e0eb6 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -3263,7 +3263,7 @@ fn createFoo(param: i32) !Foo { {#header_open|Implementation Details#}

diff --git a/lib/compiler/test_runner.zig b/lib/compiler/test_runner.zig index fd4ac20eb0f2f5bc6cd89ddbe00739dbcdb3450e..2a5483907ebc830ff0df2e37b391ab2ca573d457 100644 --- a/lib/compiler/test_runner.zig +++ b/lib/compiler/test_runner.zig @@ -144,7 +144,7 @@ fn mainServer(init: std.process.Init.Minimal) !void { error.SkipZigTest => .skip, else => s: { if (@errorReturnTrace()) |trace| { - std.debug.dumpStackTrace(trace); + std.debug.dumpErrorReturnTrace(trace); } break :s .fail; }, @@ -312,7 +312,7 @@ fn mainTerminal(init: std.process.Init.Minimal) void { std.debug.print("FAIL ({t})\n", .{err}); } if (@errorReturnTrace()) |trace| { - std.debug.dumpStackTrace(trace); + std.debug.dumpErrorReturnTrace(trace); } test_node.end(); }, @@ -438,7 +438,7 @@ var fuzz_runner: if (builtin.fuzz) struct { error.SkipZigTest => return, else => { if (@errorReturnTrace()) |trace| { - std.debug.dumpStackTrace(trace); + std.debug.dumpErrorReturnTrace(trace); } std.debug.print("failed with error.{t}\n", .{err}); std.process.exit(1); diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index 8f31add6e20892c48bf1872fc6829ca55a4bd357..6e9f7fb5401d66294ad4c2377a651a5c0d323caa 100644 --- a/lib/std/Thread.zig +++ b/lib/std/Thread.zig @@ -442,7 +442,7 @@ fn callFn(comptime f: anytype, args: anytype) switch (Impl) { @call(.auto, f, args) catch |err| { std.debug.print("error: {s}\n", .{@errorName(err)}); if (@errorReturnTrace()) |trace| { - std.debug.dumpStackTrace(trace); + std.debug.dumpErrorReturnTrace(trace); } }; @@ -932,7 +932,7 @@ const WasiThreadImpl = struct { @call(.auto, f, w.args) catch |err| { std.debug.print("error: {s}\n", .{@errorName(err)}); if (@errorReturnTrace()) |trace| { - std.debug.dumpStackTrace(trace); + std.debug.dumpErrorReturnTrace(trace); } }; }, diff --git a/lib/std/std.zig b/lib/std/std.zig index 5cb856f9cc09695f0799a144b1ce3a62579494f4..e700c728c10fd811a18cef3b826d3b2296af685d 100644 --- a/lib/std/std.zig +++ b/lib/std/std.zig @@ -165,6 +165,8 @@ pub const Options = struct { /// * `debug.dumpCurrentStackTrace` /// * `debug.writeStackTrace` /// * `debug.dumpStackTrace` + /// * `debug.writeErrorReturnTrace` + /// * `debug.dumpErrorReturnTrace` /// /// Stack traces can generally be collected and printed when debug info is stripped, but are /// often less useful since they usually cannot be mapped to source locations and/or have bad