summaryrefslogtreecommitdiff
path: root/src/gameinfoimpl.cpp
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2015-11-04 21:39:14 +0000
committerThomas Tanner <trtanner@btinternet.com>2015-11-04 21:39:14 +0000
commit1a12b1f1f6256139427c2516d314f25c593087c5 (patch)
tree6d51d57d9d7858b291f2e6827cb65258ceba011d /src/gameinfoimpl.cpp
parent184cff8a7731c83f049dedb0f8e20d91c36e77a3 (diff)
Decided it shouldn't be an error if i can't get information about the file.
Diffstat (limited to 'src/gameinfoimpl.cpp')
-rw-r--r--src/gameinfoimpl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gameinfoimpl.cpp b/src/gameinfoimpl.cpp
index 979e6c8d..98b0fddf 100644
--- a/src/gameinfoimpl.cpp
+++ b/src/gameinfoimpl.cpp
@@ -63,20 +63,20 @@ QString GetAppVersion(std::wstring const &app_name)
DWORD info_len = ::GetFileVersionInfoSizeW(app_name.c_str(), &handle);
if (info_len == 0) {
qDebug("GetFileVersionInfoSizeW Error %d", ::GetLastError());
- throw std::runtime_error("Failed to get version info");
+ return "";
}
std::vector<char> buff(info_len);
if( ! ::GetFileVersionInfoW(app_name.c_str(), handle, info_len, buff.data())) {
qDebug("GetFileVersionInfoW Error %d", ::GetLastError());
- throw std::runtime_error("Failed to get version info");
+ return "";
}
VS_FIXEDFILEINFO *pFileInfo;
UINT buf_len;
if ( ! ::VerQueryValueW(buff.data(), L"\\", reinterpret_cast<LPVOID *>(&pFileInfo), &buf_len)) {
qDebug("VerQueryValueW Error %d", ::GetLastError());
- throw std::runtime_error("Failed to get version info");
+ return "";
}
return QString("%1.%2.%3.%4").arg(HIWORD(pFileInfo->dwFileVersionMS))
.arg(LOWORD(pFileInfo->dwFileVersionMS))