aboutsummaryrefslogtreecommitdiff
path: root/src/win/Exception.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-12 21:35:08 +0800
committercrupest <crupest@outlook.com>2022-01-12 21:35:08 +0800
commit7a42d92c10a4bc686244668dd0e3f903f30f2fae (patch)
treee48fc4a47afa5eadbdf54cec6d2b73110f500680 /src/win/Exception.cpp
parent882d843083895f4905571dc273e801ee18fd5984 (diff)
downloadcru-7a42d92c10a4bc686244668dd0e3f903f30f2fae.tar.gz
cru-7a42d92c10a4bc686244668dd0e3f903f30f2fae.tar.bz2
cru-7a42d92c10a4bc686244668dd0e3f903f30f2fae.zip
...
Diffstat (limited to 'src/win/Exception.cpp')
-rw-r--r--src/win/Exception.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/win/Exception.cpp b/src/win/Exception.cpp
index a7b0927a..cf55c191 100644
--- a/src/win/Exception.cpp
+++ b/src/win/Exception.cpp
@@ -7,10 +7,9 @@ namespace cru::platform::win {
inline String HResultMakeMessage(HRESULT h_result,
std::optional<String> message) {
if (message.has_value())
- return fmt::format(FMT_STRING(L"HRESULT: {:#08x}. Message: {}"), h_result,
- message->WinCStr());
+ return Format(L"HRESULT: {}. Message: {}", h_result, message->WinCStr());
else
- return fmt::format(FMT_STRING(L"HRESULT: {:#08x}."), h_result);
+ return Format(L"HRESULT: {}.", h_result);
}
HResultError::HResultError(HRESULT h_result)
@@ -25,8 +24,8 @@ HResultError::HResultError(HRESULT h_result,
h_result_(h_result) {}
inline String Win32MakeMessage(DWORD error_code, String message) {
- return fmt::format(L"Last error code: {:#04x}.\nMessage: {}\n", error_code,
- message.WinCStr());
+ return Format(L"Last error code: {}.\nMessage: {}\n", error_code,
+ message.WinCStr());
}
Win32Error::Win32Error(std::string_view message)