]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/except.cpp
New system_error exception class
[libs/core.git] / source / core / except.cpp
index 0ae2e59bd9ba339a78d7560ed13326ac6af83e45..bdcdd7df3da312b5f613630da9a67ec11ab8d0c5 100644 (file)
@@ -20,14 +20,14 @@ Exception::Exception(const string &w):
        wot(w)
 {
 #ifdef WITH_EXCEPTION_BACKTRACE
-       bt=Debug::Backtrace::create();
+       bt = Debug::Backtrace::create();
 #endif
 }
 
 Exception &Exception::at(const std::string &w) throw()
 {
-       wer=w;
-       wot=wer+": "+wot;
+       wer = w;
+       wot = wer+": "+wot;
        return *this;
 }
 
@@ -43,7 +43,7 @@ string SystemError::build_what(const string &w, int e)
        buf<<w<<": ";
 #ifdef WIN32
        char msg[1024];
-       if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, e, 0, msg, sizeof(msg), 0))
+       if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, 0, e, 0, msg, sizeof(msg), 0))
                buf<<msg;
        else
                buf<<e;