Skip to content

Commit

Permalink
fix(ledger): test code panics when built in release mode
Browse files Browse the repository at this point in the history
retrieving a stack trace must be run at comptime? i just put a null check to deal with it, instead of unwrapping the optional.
  • Loading branch information
dnut committed Sep 5, 2024
1 parent 88e63c0 commit bda0e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ledger/database.zig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn testDatabase(comptime Impl: fn ([]const ColumnFamily) type) !void {
}
err = e;
std.debug.print("\n\u{001B}[35m{s}\u{001B}[0m\n\n", .{decl.name});
std.debug.dumpStackTrace(@errorReturnTrace().?.*);
if (@errorReturnTrace()) |trace| std.debug.dumpStackTrace(trace.*);
};
}
if (err) |e| {
Expand Down

0 comments on commit bda0e6a

Please sign in to comment.