summaryrefslogtreecommitdiff
path: root/zen/sys_error.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:11:35 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:11:35 +0200
commit015bb675d6eb177900c8ac94a6d35edc5ad90576 (patch)
treeedde4153ce9b2ba6bdaf9d3c0af0966ed6dfd717 /zen/sys_error.h
parent9.8 (diff)
downloadFreeFileSync-015bb675d6eb177900c8ac94a6d35edc5ad90576.tar.gz
FreeFileSync-015bb675d6eb177900c8ac94a6d35edc5ad90576.tar.bz2
FreeFileSync-015bb675d6eb177900c8ac94a6d35edc5ad90576.zip
9.9
Diffstat (limited to 'zen/sys_error.h')
-rwxr-xr-xzen/sys_error.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/zen/sys_error.h b/zen/sys_error.h
index 31eb8209..c179ec8a 100755
--- a/zen/sys_error.h
+++ b/zen/sys_error.h
@@ -81,7 +81,11 @@ std::wstring formatSystemError(const std::wstring& functionName, long long lastE
inline
std::wstring formatSystemError(const std::wstring& functionName, ErrorCode ec)
{
- return formatSystemError(functionName, replaceCpy(_("Error Code %x"), L"%x", numberTo<std::wstring>(ec)), formatSystemErrorRaw(ec));
+ //static_assert(sizeof(ec) == sizeof(int), "");
+ //const std::wstring errorCode = printNumber<std::wstring>(L"0x%08x", static_cast<int>(ec));
+ const std::wstring errorCode = numberTo<std::wstring>(ec);
+
+ return formatSystemError(functionName, replaceCpy(_("Error Code %x"), L"%x", errorCode), formatSystemErrorRaw(ec));
}
bgstack15