Prefix unknown error's code with 0x, and log FormaMessage's error code

This commit is contained in:
Lauri Nurmi
2019-05-13 09:43:18 +03:00
committed by Lauri Nurmi
parent 04cebe381a
commit 18e4cf9b80

View File

@@ -1075,9 +1075,11 @@ static const wxChar* GetSysErrorMsg(wxChar* szBuf, size_t sizeBuf, unsigned long
NULL
) == 0 )
{
wxLogDebug(wxS("FormatMessage failed with error 0x%lx in %s"),
GetLastError(), __WXFUNCTION__ ? __WXFUNCTION__ : "");
// if this happens, something is seriously wrong, so don't use _() here
// for safety
wxSprintf(szBuf, wxS("unknown error %lx"), nErrCode);
wxSprintf(szBuf, wxS("unknown error 0x%lx"), nErrCode);
return szBuf;
}