00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INCL_SYNC_EXC
00020 #define INCL_SYNC_EXC
00021
00026 #include "base/fscapi.h"
00027 #include "base/errors.h"
00028 #include <string>
00029
00030
00036 class SyncException {
00037
00038 private:
00039
00041 static SyncException* pinstance;
00042
00043
00045 char* errorMsg;
00047 WCHAR* werrorMsg;
00048
00050 DWORD errorCode;
00051
00052 protected:
00053
00055 SyncException();
00056
00057
00058 public:
00059
00061 static SyncException* getInstance();
00062
00064 ~SyncException();
00065
00067 void setExceptionData(const char* msg, DWORD code = NULL);
00068
00070 void clear();
00071
00073 const char* getErrorMsg();
00074 const WCHAR* wgetErrorMsg();
00075 const std::wstring wstrgetErrorMsg();
00076 _declspec(dllexport) DWORD getErrorCode();
00077 };
00078
00079
00080
00081
00083 void throwSyncException(const char* msg, DWORD code = NULL);
00084
00085
00088 #endif