diff options
Diffstat (limited to 'src/panic_handler.zig')
-rw-r--r-- | src/panic_handler.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/panic_handler.zig b/src/panic_handler.zig index f07d2f6bb..cb7877b87 100644 --- a/src/panic_handler.zig +++ b/src/panic_handler.zig @@ -16,7 +16,7 @@ const Features = @import("./analytics/analytics_thread.zig").Features; const HTTP = @import("http").AsyncHTTP; const Report = @import("./report.zig"); -pub fn NewPanicHandler(comptime panic_func: fn (msg: []const u8, error_return_type: ?*std.builtin.StackTrace) noreturn) type { +pub fn NewPanicHandler(comptime panic_func: @TypeOf(std.builtin.default_panic)) type { return struct { panic_count: usize = 0, skip_next_panic: bool = false, @@ -30,7 +30,7 @@ pub fn NewPanicHandler(comptime panic_func: fn (msg: []const u8, error_return_ty .log = log, }; } - pub inline fn handle_panic(msg: []const u8, error_return_type: ?*std.builtin.StackTrace) noreturn { + pub fn handle_panic(msg: []const u8, error_return_type: ?*std.builtin.StackTrace, addr: ?usize) noreturn { // This exists to ensure we flush all buffered output before panicking. Output.flush(); @@ -39,7 +39,7 @@ pub fn NewPanicHandler(comptime panic_func: fn (msg: []const u8, error_return_ty Output.disableBuffering(); // // We want to always inline the panic handler so it doesn't show up in the stacktrace. - @call(.{ .modifier = .always_inline }, panic_func, .{ msg, error_return_type }); + @call(.{ .modifier = .always_inline }, panic_func, .{ msg, error_return_type, addr }); } }; } |