#include <sstream>
#include <cstring>
+#ifdef WIN32
+#include <windows.h>
+#endif
#include "except.h"
using namespace std;
ostringstream buf;
buf<<w<<": ";
#ifdef WIN32
- buf<<e;
+ char msg[1024];
+ if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, e, 0, msg, sizeof(msg), 0))
+ buf<<msg;
+ else
+ buf<<e;
#else
buf<<strerror(e);
#endif