16 #ifndef MBase_ExceptionImpl_h 17 #define MBase_ExceptionImpl_h 19 #include "PDCHeader/PDCstring" 22 #include "../Base/LastError.h" 23 #include "../Base/UTFConverter.h" 24 #include "../Interfaces/BaseException.h" 26 #if defined(GetMessage) 27 #error Please make sure that you include <winbase.h>/<windows.h> properly (via Common/PDCHeader) 78 template<
class T = MBase::BaseException>
89 #ifndef NO_WCHAR_SUPPORT 120 #ifndef NO_WCHAR_SUPPORT 145 #ifndef NO_WCHAR_SUPPORT 176 return T::GetErrorCode();
186 void Concatenate(
const WCHAR* ipcMessage,
const WCHAR* ipcRelatedMessage )
throw()
190 #ifdef NO_WCHAR_SUPPORT 191 _ASSERTE( std::string( ipcMessage ).length() > 0 );
192 _ASSERTE( std::string( ipcRelatedMessage ).length() > 0 );
194 std::string lMessage(ipcMessage);
196 _ASSERTE( std::wstring( ipcMessage ).length() > 0 );
197 _ASSERTE( std::wstring( ipcRelatedMessage ).length() > 0 );
199 std::wstring lMessage(ipcMessage);
203 lMessage +=
_T(
"\n");
204 lMessage += ipcRelatedMessage;
216 #endif // MBase_ExceptionImpl_h wchar_t WCHAR
Definition: PDCwchar.h:23
ExceptionImpl(const char *ipcUTF8Message, BaseException &irRelatedException)
Definition: ExceptionImpl.h:128
#define _ASSERT(x)
Definition: Asserte.h:34
unsigned Int32 ErrorCode
Definition: LastError.h:31
#define _ASSERTE(x)
Definition: Asserte.h:40
DLL_BASE_EXIM ReturnWString UTF8ToWideChar(const char *ipUTF8, bool ibUseSubstitutionCharacter=false)
MBase::ErrorCode GetErrorCode() const
Definition: ExceptionImpl.h:174
ExceptionImpl(const WCHAR *ipcMessage)
Definition: ExceptionImpl.h:90
const WCHAR * GetMessage() const
Definition: ExceptionImpl.h:164
#define _T(x)
Definition: PDCtchar.h:94
DLL_BASE_EXIM ReturnWString GetSystemErrorDescription(ErrorCode iErrorCode)
ExceptionImpl(const char *ipUTF8Message, MBase::ErrorCode iErrorCode)
Definition: ExceptionImpl.h:153
Definition: Allocator.h:47
void SetErrorCode(MBase::ErrorCode iErrorCode)
Definition: ExceptionImpl.h:179
const WCHAR * GetMessage() const
ExceptionImpl(const WCHAR *ipcMessage, BaseException &irRelatedException)
Definition: ExceptionImpl.h:121
ExceptionImpl(const char *ipcUTF8Message)
Definition: ExceptionImpl.h:97
Definition: ExceptionImpl.h:79
ExceptionImpl(const WCHAR *ipcMessage, MBase::ErrorCode iErrorCode)
Definition: ExceptionImpl.h:146