From 3bafc4400a40b497b3b3f8113f72c4b80969f13f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 11 Apr 2024 13:58:08 -0700 Subject: [PATCH] std.debug.panic: pass the args Why was this passing null? These values are available and useful. --- lib/std/debug.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index f54856c05b..eaa5ca9ff7 100644 --- 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`