diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-09 00:11:35 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-09 00:11:35 +0200 |
commit | 015bb675d6eb177900c8ac94a6d35edc5ad90576 (patch) | |
tree | edde4153ce9b2ba6bdaf9d3c0af0966ed6dfd717 /zen/sys_error.h | |
parent | 9.8 (diff) | |
download | FreeFileSync-015bb675d6eb177900c8ac94a6d35edc5ad90576.tar.gz FreeFileSync-015bb675d6eb177900c8ac94a6d35edc5ad90576.tar.bz2 FreeFileSync-015bb675d6eb177900c8ac94a6d35edc5ad90576.zip |
9.9
Diffstat (limited to 'zen/sys_error.h')
-rwxr-xr-x | zen/sys_error.h | 6 |
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)); } |