aboutsummaryrefslogtreecommitdiff
path: root/c/win.h
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-22 13:13:10 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-22 13:13:10 +0200
commit8566655b85f0a4e515d57f6686636db516116f95 (patch)
treed27ec314359a083210492a371b5fce1761e734ae /c/win.h
parentee1eafe1ed12c2c46ed31ad560daeae11ab1e027 (diff)
downloadEpisodeBrowser-8566655b85f0a4e515d57f6686636db516116f95.tar.gz
Improve Win32Error, add Min.
Diffstat (limited to 'c/win.h')
-rw-r--r--c/win.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/c/win.h b/c/win.h
index 06de198..26a21b2 100644
--- a/c/win.h
+++ b/c/win.h
@@ -25,12 +25,13 @@ struct WideException : public std::exception
/* Exception for Windows API errors. */
struct Win32Error : public WideException
{
- Win32Error(DWORD code = GetLastError()) noexcept;
+ Win32Error(DWORD code = GetLastError(), HMODULE hModule = nullptr) noexcept;
~Win32Error() noexcept;
const char* what() const noexcept override;
const wchar_t* What() const noexcept override;
DWORD code;
private:
+ HMODULE hModule;
char* m_szMsg = nullptr;
wchar_t* m_wszMsg = nullptr;
};