Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

unexpectedError

Public Function
std.os.windows.unexpectedError
pub fn unexpectedError(err: Win32Error) UnexpectedError

Call this when you made a windows DLL call or something that does SetLastError and you get an unexpected error.

Params

File

os/windows.zig:3934
3934
3935
3936
3937
3938
3939
3940
3941
pub 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;
}