X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fsystemerror.cpp;h=5424ef0ee647d564a624eb4e190553d7a808f88e;hp=1ccee74ed4a80139c77e1e013567465f4325906e;hb=609c9a508cfdc7b42c46c4f21d17639204165a00;hpb=b4806214e905752617691f851717033fd3f266c2 diff --git a/source/core/systemerror.cpp b/source/core/systemerror.cpp index 1ccee74..5424ef0 100644 --- a/source/core/systemerror.cpp +++ b/source/core/systemerror.cpp @@ -1,10 +1,3 @@ -#ifdef WIN32 -#include -#include -#else -#include -#include -#endif #include #include "systemerror.h" @@ -22,23 +15,4 @@ system_error::system_error(const string &w, const string &e): code_(numeric_limits::min()) { } -string system_error::get_message(int c) -{ -#ifdef WIN32 - if(c==-1) - c = GetLastError(); - - char msg[1024]; - if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, 0, c, 0, msg, sizeof(msg), 0)) - return msg; - else - return lexical_cast(c, Fmt().hex()); -#else - if(c==-1) - c = errno; - - return strerror(c); -#endif -} - } // namespace Msp