From b5917be252caf9d38ae9466352c4176ef25732e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 7 Sep 2022 23:33:08 +0200 Subject: Simplify Err message format. --- c/ext.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'c/ext.cpp') diff --git a/c/ext.cpp b/c/ext.cpp index c1bcc48..3c9542b 100644 --- a/c/ext.cpp +++ b/c/ext.cpp @@ -12,7 +12,7 @@ bool OpenOnline(const CfgA& cfg, int iEp) INT_PTR r = reinterpret_cast( ShellExecuteW(nullptr, L"open", url, nullptr, nullptr, SW_SHOWNORMAL)); if (r <= 32) - throw Err(WINDOWS, L"Address "s + url + L" could not be opened: %s."); + throw Err(WINDOWS, L"Address "s + url + L" could not be opened"); return true; } @@ -23,7 +23,7 @@ bool OpenWiki(const DlvDataA& d) INT_PTR r = reinterpret_cast( ShellExecuteW(nullptr, L"open", url, nullptr, nullptr, SW_SHOWNORMAL)); if (r <= 32) - throw Err(WINDOWS, L"Address "s + url + L" could not be opened: %s."); + throw Err(WINDOWS, L"Address "s + url + L" could not be opened"); return true; } @@ -84,7 +84,7 @@ static bool FindMatchingFile(wchar_t (&file)[MAX_PATH], const wchar_t* const roo WIN32_FIND_DATA fdata; Unique h = FindFirstFileW(pat, &fdata); if (h.Bad(INVALID_HANDLE_VALUE)) - throw Err(WINDOWS, L"Directory "s + root + L" could not be traversed: %s."); + throw Err(WINDOWS, L"Directory "s + root + L" could not be traversed"); do if (fdata.cFileName[0] == L'.') @@ -102,7 +102,7 @@ static bool FindMatchingFile(wchar_t (&file)[MAX_PATH], const wchar_t* const roo while (FindNextFileW(h.v, &fdata)); if (GetLastError() != ERROR_NO_MORE_FILES) - throw Err(WINDOWS, L"Next file in "s + root + L" could not be accessed: %s."); + throw Err(WINDOWS, L"Next file in "s + root + L" could not be accessed"); return false; } @@ -114,7 +114,7 @@ bool OpenLocally(CfgA& cfg, const ElvDataA& e) INT_PTR r = reinterpret_cast( ShellExecuteW(nullptr, L"open", file, nullptr, nullptr, SW_SHOWNORMAL)); if (r <= 32) - throw Err(WINDOWS, L"File "s + file + L" could not be opened: %s."); + throw Err(WINDOWS, L"File "s + file + L" could not be opened"); return true; } else return false; -- cgit v1.2.3