00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <xsec/framework/XSECDefs.hpp>
00029 #include <xsec/framework/XSECException.hpp>
00030
00045 extern const char * XSECExceptionStrings [];
00046
00049 #if defined (_WIN32) && defined (_DEBUG) && defined (_XSEC_DO_MEMDEBUG_OLD)
00050
00051 # define XSECnew( a, b ) \
00052 try {\
00053 if (( a = DEBUG_NEW b ) == NULL) { \
00054 throw XSECException (XSECException::MemoryAllocationFail); \
00055 }\
00056 } \
00057 catch (XSECException &e) \
00058 {\
00059 throw XSECException (XSECException::InternalError, e.getMsg()); \
00060 } \
00061 catch (...) { \
00062 throw XSECException (XSECException::MemoryAllocationFail); \
00063 }
00064
00065 #else
00066
00067 # define XSECnew(a, b) \
00068 try {\
00069 if ((a = new b) == NULL) { \
00070 throw XSECException (XSECException::MemoryAllocationFail); \
00071 } \
00072 } \
00073 catch (XSECException &e) \
00074 {\
00075 throw XSECException (XSECException::InternalError, e.getMsg()); \
00076 } \
00077 catch (...) { \
00078 throw XSECException (XSECException::MemoryAllocationFail); \
00079 }
00080 #endif