fix(zig-0.16): update return trace handling to new API

This commit is contained in:
CJ van den Berg 2026-04-15 12:46:13 +02:00
parent af6262e48e
commit 3a321ecfe0
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -254,7 +254,7 @@ fn store_stack_trace(stack_trace: std.builtin.StackTrace, writer: *std.Io.Writer
writer.print("Unable to store stack trace: debug info stripped\n", .{}) catch return;
return;
}
std.debug.writeStackTrace(&stack_trace, .{ .writer = writer, .mode = .no_color }) catch |err| {
std.debug.writeErrorReturnTrace(&stack_trace, .{ .writer = writer, .mode = .no_color }) catch |err| {
writer.print("Unable to dump stack trace: {s}\n", .{@errorName(err)}) catch return;
return;
};
@ -651,7 +651,7 @@ fn to_result(ret: result) c.thespian_result {
if (!(cbor.match(msg, .{ "exit", "normal" }) catch false)) {
if (env.get().is("dump-stack-trace")) {
const trace_ = @errorReturnTrace();
if (trace_) |t| std.debug.dumpStackTrace(t);
if (trace_) |t| std.debug.dumpErrorReturnTrace(t);
}
}
return &error_buffer_tl;