]> git.tdb.fi Git - libs/core.git/commitdiff
Use new system_error class in TimeZone
authorMikko Rasa <tdb@tdb.fi>
Mon, 30 May 2011 21:11:57 +0000 (00:11 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 30 May 2011 21:15:09 +0000 (00:15 +0300)
source/time/timezone.cpp

index 17d6bad846b981d31e663c1099d7ed81c18fab19..7c837484c705239f06537e2781209b396c1ef4ba 100644 (file)
@@ -11,8 +11,8 @@ Distributed under the LGPL
 #else
 #include <fcntl.h>
 #endif
+#include <msp/core/systemerror.h>
 #include <msp/strings/format.h>
-#include "../core/except.h"
 #include "timestamp.h"
 #include "timezone.h"
 #include "units.h"
@@ -40,7 +40,7 @@ TimeZone get_local_timezone()
        TIME_ZONE_INFORMATION tzinfo;
        DWORD dst = GetTimeZoneInformation(&tzinfo);
        if(dst==TIME_ZONE_ID_INVALID)
-               throw Msp::SystemError("Failed to get time zone information", GetLastError());
+               throw Msp::system_error("GetTimeZoneInformation");
 
        int offset = tzinfo.Bias;
        if(dst==TIME_ZONE_ID_STANDARD)