diff options
author | crupest <crupest@outlook.com> | 2018-09-22 22:57:44 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-22 22:57:44 +0800 |
commit | 5d91d1e5594e37ca5c282e602407eaeb34c6d986 (patch) | |
tree | 0086bb88c152b8ea9eb31e86906afcd238309cda /CruUI/exception.cpp | |
parent | dc293cef8f25ba70c5d99d73aa472277484ca879 (diff) | |
download | cru-5d91d1e5594e37ca5c282e602407eaeb34c6d986.tar.gz cru-5d91d1e5594e37ca5c282e602407eaeb34c6d986.tar.bz2 cru-5d91d1e5594e37ca5c282e602407eaeb34c6d986.zip |
Done 3 things:
1. Add some helper functions for create controls with layout params.
2. Fix a bug in measure of linear layout.
3. Fix a bug in exception.
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) |