Commit cffe9e0
committed
std::os: Handle FormatMessage failure
`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 #130731 parent 30165e0 commit cffe9e0
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
744 | 746 | | |
745 | 747 | | |
746 | | - | |
747 | | - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
748 | 753 | | |
749 | 754 | | |
750 | 755 | | |
| |||
0 commit comments