diff options
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)); } |