aboutsummaryrefslogtreecommitdiff
path: root/c/common.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-20 20:15:22 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-20 20:15:22 +0200
commit0d5736538a98b2c4001c45d073affc6bc0d772e5 (patch)
treeb14f4e8e7ee0c0ab64294c1c53b83ea8f44f3225 /c/common.cpp
parent400d4d12b7a70b81629a119844e7d5ad16aa6012 (diff)
downloadEpisodeBrowser-0d5736538a98b2c4001c45d073affc6bc0d772e5.tar.gz
Use GetLastError() as default for Win32Error.
Diffstat (limited to 'c/common.cpp')
-rw-r--r--c/common.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/c/common.cpp b/c/common.cpp
index ba52f2c..25ff899 100644
--- a/c/common.cpp
+++ b/c/common.cpp
@@ -4,6 +4,7 @@
/* Win32Error: Exception for Windows API errors. */
+Win32Error::Win32Error() : m_dwErr(GetLastError()) {}
Win32Error::Win32Error(const DWORD dwErr) : m_dwErr(dwErr) {}
Win32Error::~Win32Error()
@@ -48,7 +49,7 @@ Library::Library(const TCHAR* const tszLibrary)
{
m_hModule = LoadLibrary(tszLibrary);
if (!m_hModule)
- throw Win32Error(GetLastError());
+ throw Win32Error();
}
Library::~Library()