diff options
Diffstat (limited to 'CruUI/exception.cpp')
-rw-r--r-- | CruUI/exception.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CruUI/exception.cpp b/CruUI/exception.cpp index 38075247..a1d59ceb 100644 --- a/CruUI/exception.cpp +++ b/CruUI/exception.cpp @@ -7,9 +7,9 @@ namespace cru inline std::string HResultMakeMessage(HRESULT h_result, std::optional<std::string> message) { if (message.has_value()) - return fmt::format("An HResultError is thrown. HRESULT: {:#08x}.\n", h_result); - else return fmt::format("An HResultError is thrown. HRESULT: {:#08x}.\nAdditional message: {}\n", h_result, message.value()); + else + return fmt::format("An HResultError is thrown. HRESULT: {:#08x}.\n", h_result); } HResultError::HResultError(HRESULT h_result, std::optional<std::string_view> additional_message) @@ -21,9 +21,9 @@ namespace cru inline std::string Win32MakeMessage(DWORD error_code, std::optional<std::string> message) { if (message.has_value()) - return fmt::format("Last error code: {:#04x}.\n", error_code); - else return fmt::format("Last error code: {:#04x}.\nAdditional message: {}\n", error_code, message.value()); + else + return fmt::format("Last error code: {:#04x}.\n", error_code); } Win32Error::Win32Error(DWORD error_code, std::optional<std::string_view> additional_message) |