summaryrefslogtreecommitdiff
path: root/lib/win32/emu.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-03-10 17:29:31 +0000
committerChris Wilson <chris+github@qwirx.com>2007-03-10 17:29:31 +0000
commita936147b531d87060e61dec21342d32d05d2f0a0 (patch)
treec415fc3d84e294a3ac44fb7016f52eba620cf3b4 /lib/win32/emu.cpp
parentf54474874ae06d72963d560cd17b1fe0f0c82106 (diff)
Improve GetErrorMessage() by including the error number/code in the message
(helps debugging on foreign langauge versions of Windows) (refs #3, merges [1364])
Diffstat (limited to 'lib/win32/emu.cpp')
-rw-r--r--lib/win32/emu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/win32/emu.cpp b/lib/win32/emu.cpp
index 0a7b8ed6..b201a9e0 100644
--- a/lib/win32/emu.cpp
+++ b/lib/win32/emu.cpp
@@ -18,6 +18,7 @@
#include <string>
#include <list>
+#include <sstream>
// message resource definitions for syslog()
@@ -502,10 +503,11 @@ std::string GetErrorMessage(DWORD errorCode)
return std::string("failed to get error message");
}
- std::string out(pMsgBuf);
+ std::ostringstream line;
+ line << pMsgBuf << " (" << errorCode << ")";
LocalFree(pMsgBuf);
- return out;
+ return line.str();
}
// --------------------------------------------------------------------------