#include <cerrno>
#include <cstring>
#endif
+#include <limits>
#include "systemerror.h"
using namespace std;
code_(c)
{ }
+system_error::system_error(const string &w, const string &e):
+ runtime_error(w+": "+e),
+ code_(numeric_limits<int>::min())
+{ }
+
string system_error::get_message(int c)
{
#ifdef WIN32
if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, 0, c, 0, msg, sizeof(msg), 0))
return msg;
else
- return lexical_cast(c, Fmt().hex());
+ return lexical_cast<string>(c, Fmt().hex());
#else
if(c==-1)
c = errno;