mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
Print last system error on fs::error::unknown
This commit is contained in:
parent
695799c39a
commit
d3c0ec5651
@ -2639,6 +2639,17 @@ void fmt_class_string<fs::seek_mode>::format(std::string& out, u64 arg)
|
||||
template<>
|
||||
void fmt_class_string<fs::error>::format(std::string& out, u64 arg)
|
||||
{
|
||||
if (arg == static_cast<u64>(fs::error::unknown))
|
||||
{
|
||||
// Note: may not be the correct error code because it only prints the last
|
||||
#ifdef _WIN32
|
||||
fmt::append(out, "Unknown error [errno=%d]", GetLastError());
|
||||
#else
|
||||
fmt::append(out, "Unknown error [errno=%d]", errno);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
format_enum(out, arg, [](auto arg)
|
||||
{
|
||||
switch (arg)
|
||||
|
Loading…
Reference in New Issue
Block a user