os: windows: fix unhandled error

This commit is contained in:
Ali Chraghi 2022-11-19 19:40:42 +03:30 committed by Veikka Tuominen
parent adc3fafbc0
commit fca776f8f5

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),
}
}