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 {...@@ -2077,7 +2077,7 @@ pub fn unexpectedError(err: Win32Error) std.os.UnexpectedError {
2077 );2077 );
2078 _ = std.unicode.utf16leToUtf8(&buf_utf8, buf_wstr[0..len]) catch unreachable;2078 _ = std.unicode.utf16leToUtf8(&buf_utf8, buf_wstr[0..len]) catch unreachable;
2079 std.debug.print("error.Unexpected: GetLastError({}): {s}\n", .{ @enumToInt(err), buf_utf8[0..len] });2079 std.debug.print("error.Unexpected: GetLastError({}): {s}\n", .{ @enumToInt(err), buf_utf8[0..len] });
2080 std.debug.dumpCurrentStackTrace(null);2080 std.debug.dumpCurrentStackTrace(@returnAddress());
2081 }2081 }
2082 return error.Unexpected;2082 return error.Unexpected;
2083}2083}
...@@ -2091,7 +2091,7 @@ pub fn unexpectedWSAError(err: ws2_32.WinsockError) std.os.UnexpectedError {...@@ -2091,7 +2091,7 @@ pub fn unexpectedWSAError(err: ws2_32.WinsockError) std.os.UnexpectedError {
2091pub fn unexpectedStatus(status: NTSTATUS) std.os.UnexpectedError {2091pub fn unexpectedStatus(status: NTSTATUS) std.os.UnexpectedError {
2092 if (std.os.unexpected_error_tracing) {2092 if (std.os.unexpected_error_tracing) {
2093 std.debug.print("error.Unexpected NTSTATUS=0x{x}\n", .{@enumToInt(status)});2093 std.debug.print("error.Unexpected NTSTATUS=0x{x}\n", .{@enumToInt(status)});
2094 std.debug.dumpCurrentStackTrace(null);2094 std.debug.dumpCurrentStackTrace(@returnAddress());
2095 }2095 }
2096 return error.Unexpected;2096 return error.Unexpected;
2097}2097}