[Box Backup-commit] COMMIT r1401 - box/chris/merge/lib/win32

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Mar 10 17:29:31 GMT 2007


Author: chris
Date: 2007-03-10 17:29:31 +0000 (Sat, 10 Mar 2007)
New Revision: 1401

Modified:
   box/chris/merge/lib/win32/emu.cpp
Log:
Improve GetErrorMessage() by including the error number/code in the message
(helps debugging on foreign langauge versions of Windows) 
(refs #3, merges [1364])


Modified: box/chris/merge/lib/win32/emu.cpp
===================================================================
--- box/chris/merge/lib/win32/emu.cpp	2007-03-10 17:27:31 UTC (rev 1400)
+++ box/chris/merge/lib/win32/emu.cpp	2007-03-10 17:29:31 UTC (rev 1401)
@@ -18,6 +18,7 @@
 
 #include <string>
 #include <list>
+#include <sstream>
 
 // message resource definitions for syslog()
 
@@ -502,10 +503,11 @@
 		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();
 }
 
 // --------------------------------------------------------------------------




More information about the Boxbackup-commit mailing list