authorgravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2023-01-08 23:51:55-05:00
committergravatar for kcbanner@gmail.comCasey Banner <kcbanner@gmail.com> 2023-01-08 23:51:55-05:00
log58e558822a2980bcaf29ce2a07474093702cabc6
treee1a460ff1373d016949d0902a066746421dabb2c
parent5e3cadf871ab800d90c85f39cc28b922539d4dbf

windows: unexpectedStatus/unexpectedError start the stack trace at the caller


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/os/windows.zig+2-2
......@@ -2077,7 +2077,7 @@ pub fn unexpectedError(err: Win32Error) std.os.UnexpectedError {
20772077 );
20782078 _ = std.unicode.utf16leToUtf8(&buf_utf8, buf_wstr[0..len]) catch unreachable;
20792079 std.debug.print("error.Unexpected: GetLastError({}): {s}\n", .{ @enumToInt(err), buf_utf8[0..len] });
2080 std.debug.dumpCurrentStackTrace(null);
2080 std.debug.dumpCurrentStackTrace(@returnAddress());
20812081 }
20822082 return error.Unexpected;
20832083}
......@@ -2091,7 +2091,7 @@ pub fn unexpectedWSAError(err: ws2_32.WinsockError) std.os.UnexpectedError {
20912091pub fn unexpectedStatus(status: NTSTATUS) std.os.UnexpectedError {
20922092 if (std.os.unexpected_error_tracing) {
20932093 std.debug.print("error.Unexpected NTSTATUS=0x{x}\n", .{@enumToInt(status)});
2094 std.debug.dumpCurrentStackTrace(null);
2094 std.debug.dumpCurrentStackTrace(@returnAddress());
20952095 }
20962096 return error.Unexpected;
20972097}