Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::os: Handle FormatMessage failure #13078

Merged
merged 1 commit into from
Mar 22, 2014
Merged

Conversation

klutzy
Copy link
Contributor

@klutzy klutzy commented Mar 22, 2014

FormatMessageW() is called by std::os::last_os_error() to convert
errno into string, but the function may fail on non-english locale.
I don't know why it fails, but anyway it's better to return errno
than to fail!() in the case.

Fixes #13075
Fixes #13073

`FormatMessageW()` is called by `std::os::last_os_error()` to convert
errno into string, but the function may fail on non-english locale.
I don't know why it fails, but anyway it's better to return errno
than to `fail!()` in the case.

Fixes rust-lang#13075
Fixes rust-lang#13073
bors added a commit that referenced this pull request Mar 22, 2014
`FormatMessageW()` is called by `std::os::last_os_error()` to convert
errno into string, but the function may fail on non-english locale.
I don't know why it fails, but anyway it's better to return errno
than to `fail!()` in the case.

Fixes #13075
Fixes #13073
@liigo
Copy link
Contributor

liigo commented Mar 22, 2014

Thanks

@bors bors closed this Mar 22, 2014
@bors bors merged commit cffe9e0 into rust-lang:master Mar 22, 2014
JohnTitor pushed a commit to JohnTitor/rust that referenced this pull request Aug 30, 2022
internal: remove unnecessary stream writer try_clone in lsp-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

win: FormatMessage failure when io failed rustdoc: "FormatMessage failure" on Windows
4 participants