diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-12-24 23:21:21 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-12-24 23:21:21 +0000 |
commit | 482d628ec0070f11d4ca5a4ad1b5e00323e18563 (patch) | |
tree | 5aceee38748a0443e60e0c36706b32186ccb4447 | |
parent | bfb39368b61dd6bf67d85ea9fd2d1126f2b48722 (diff) |
Improve handing of error messages that Windows won't decode for some reason.
-rw-r--r-- | lib/win32/emu.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/win32/emu.cpp b/lib/win32/emu.cpp index 18624eeb..c78fe6b2 100644 --- a/lib/win32/emu.cpp +++ b/lib/win32/emu.cpp @@ -536,7 +536,10 @@ std::string GetErrorMessage(DWORD errorCode) if (chars == 0 || pMsgBuf == NULL) { - return std::string("failed to get error message"); + std::ostringstream oss; + oss << "Failed to get error message for error code " << errorCode << ": error " << + GetLastError(); + return oss.str(); } // remove embedded newline |