os: windows: fix unhandled error

This commit is contained in:
Ali Chraghi
2022-11-19 19:40:42 +03:30
committed by Andrew Kelley
parent dd175e2928
commit 1702404adf

View File

@@ -1567,6 +1567,7 @@ pub const CreateProcessError = error{
FileNotFound,
AccessDenied,
InvalidName,
NameTooLong,
Unexpected,
};
@@ -1600,6 +1601,7 @@ pub fn CreateProcessW(
.ACCESS_DENIED => return error.AccessDenied,
.INVALID_PARAMETER => unreachable,
.INVALID_NAME => return error.InvalidName,
.FILENAME_EXCED_RANGE => return error.NameTooLong,
else => |err| return unexpectedError(err),
}
}