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 (...) { \
00058 throw XSECException (XSECException::MemoryAllocationFail); \
00059 }
00060
00061 #else
00062
00063 # define XSECnew(a, b) \
00064 try {\
00065 if ((a = new b) == NULL) { \
00066 throw XSECException (XSECException::MemoryAllocationFail); \
00067 } \
00068 } \
00069 catch (...) { \
00070 throw XSECException (XSECException::MemoryAllocationFail); \
00071 }
00072 #endif