aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-04-11 13:58:08 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-04-11 23:33:38 -0700
commit3bafc4400a40b497b3b3f8113f72c4b80969f13f (patch)
tree7c977ee784cd57eb0fda5921eb05951df1bca0e3 /lib/std/debug.zig
parent9cfac4718d2a536fdd096320cc68664ae1ee2c68 (diff)
downloadzig-3bafc4400a40b497b3b3f8113f72c4b80969f13f.tar.gz
zig-3bafc4400a40b497b3b3f8113f72c4b80969f13f.zip
std.debug.panic: pass the args
Why was this passing null? These values are available and useful.
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig2
1 files changed, 1 insertions, 1 deletions
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`