zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3bafc4400a40b497b3b3f8113f72c4b80969f13f (tree)
parent 9cfac4718d2a536fdd096320cc68664ae1ee2c68
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Thu, 11 Apr 2024 13:58:08 -0700

std.debug.panic: pass the args

Why was this passing null? These values are available and useful.

Diffstat:
Mlib/std/debug.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/std/debug.zig b/lib/std/debug.zig @@ -406,7 +406,7 @@ pub fn assert(ok: bool) void { pub fn panic(comptime format: []const u8, args: anytype) noreturn { @setCold(true); - panicExtra(null, null, format, args); + panicExtra(@errorReturnTrace(), @returnAddress(), format, args); } /// `panicExtra` is useful when you want to print out an `@errorReturnTrace`