Call this when you made a syscall or something that sets errno and you get an unexpected error.
pub fn unexpectedErrno(err: E) UnexpectedError
pub fn unexpectedErrno(err: E) UnexpectedError {
if (std.options.unexpected_error_tracing) {
std.debug.print("unexpected errno: {d}\n", .{@backingInt(err)});
std.debug.dumpCurrentStackTrace(.{});
}
return error.Unexpected;
}