aboutsummaryrefslogtreecommitdiff
path: root/c/win32.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-09-07 01:22:30 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-09-07 01:22:30 +0200
commitac7d676a1c457f71f1d3ae17d74699dd95c9c985 (patch)
tree96d44cc6740de053db377ac51f3102b9871a90d4 /c/win32.cpp
parentb2a018ff822bcdb5b9b691025a5fc1eb6fc13b4b (diff)
downloadEpisodeBrowser-ac7d676a1c457f71f1d3ae17d74699dd95c9c985.tar.gz
Normalize error message formatting.
Diffstat (limited to 'c/win32.cpp')
-rw-r--r--c/win32.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/c/win32.cpp b/c/win32.cpp
index 73316e8..e1053a3 100644
--- a/c/win32.cpp
+++ b/c/win32.cpp
@@ -17,7 +17,7 @@ std::wstring WideFromNarrow(const std::string_view src, const int cp)
int cchWide = MultiByteToWideChar(cp, 0, src.data(), cchNarrow, nullptr, 0);
std::wstring dst(cchWide, 0);
if (!MultiByteToWideChar(cp, 0, src.data(), cchNarrow, dst.data(), cchWide))
- throw Err(WINDOWS, L"Narrow string could not be converted to wide string: %s");
+ throw Err(WINDOWS, L"Narrow string could not be converted to wide string: %s.");
return dst;
}
@@ -37,7 +37,7 @@ void WithNextWindow(void (*proc)(HWND))
{
if (nCode == HCBT_CREATEWND) {
if (!UnhookWindowsHookEx(hHook))
- throw Err(WINDOWS, L"Window hook could not be removed: %s");
+ throw Err(WINDOWS, L"Window hook could not be removed: %s.");
procNext(reinterpret_cast<HWND>(wParam));
return 0;
} else
@@ -46,7 +46,7 @@ void WithNextWindow(void (*proc)(HWND))
procNext = proc;
if (!(hHook = SetWindowsHookExW(WH_CBT, procCBT, nullptr, GetCurrentThreadId())))
- throw Err(WINDOWS, L"Window hook could not be set: %s");
+ throw Err(WINDOWS, L"Window hook could not be set: %s.");
}
/* Display next created window in the center of given window. */
@@ -72,7 +72,7 @@ static void CenterNextWindow(HWND hWnd)
} else if (nCode == HCBT_ACTIVATE
&& reinterpret_cast<HWND>(wParam) == hWndNext) {
if (!UnhookWindowsHookEx(hHook))
- throw Err(WINDOWS, L"Window hook could not be removed: %s");
+ throw Err(WINDOWS, L"Window hook could not be removed: %s.");
long lStyle = GetWindowLongW(hWndNext, GWL_STYLE);
if (!(lStyle & WS_POPUP)) return 0;
@@ -94,7 +94,7 @@ static void CenterNextWindow(HWND hWnd)
hWndParent = hWnd;
hWndNext = nullptr;
if (!(hHook = SetWindowsHookExW(WH_CBT, procCBT, nullptr, GetCurrentThreadId())))
- throw Err(WINDOWS, L"Window hook could not be set: %s");
+ throw Err(WINDOWS, L"Window hook could not be set: %s.");
}
int EBMessageBox(const std::wstring_view text, const std::wstring_view caption, const UINT uType)
@@ -133,7 +133,7 @@ Library::Library(const wchar_t* const lib)
{
m_hModule = LoadLibraryW(lib);
if (!m_hModule)
- throw Err(WINDOWS, L"Library "s + lib + L" could not be loaded: %s");
+ throw Err(WINDOWS, L"Library "s + lib + L" could not be loaded: %s.");
}
Library::~Library()