pub fn dumpStackTrace(st: *const StackTrace) void st: *const StackTrace914
915
916
917
918
919
920
921
922
923pub fn dumpStackTrace(st: *const StackTrace) void {
const io = std.Options.debug_io;
const prev = io.swapCancelProtection(.blocked);
defer _ = io.swapCancelProtection(prev);
const stderr = lockStderr(&.{}).terminal();
defer unlockStderr();
writeStackTrace(st, stderr) catch |err| switch (err) {
error.WriteFailed => {},
};
}
A thin wrapper around
writeStackTracewhich writes to stderr and ignores write errors.