pub fn unexpectedError(err: Win32Error) UnexpectedError err: Win32Error3934
3935
3936
3937
3938
3939
3940
3941pub fn unexpectedError(err: Win32Error) UnexpectedError {
@branchHint(.cold);
if (std.options.unexpected_error_tracing) {
std.debug.print("error.Unexpected: GetLastError({d}): {t}\n", .{ err, err });
std.debug.dumpCurrentStackTrace(.{ .first_address = @returnAddress() });
}
return error.Unexpected;
}
Call this when you made a windows DLL call or something that does SetLastError and you get an unexpected error.