1 #ifndef UNITTEST_EXCEPTIONMACROS_H
2 #define UNITTEST_EXCEPTIONMACROS_H
3 
4 #include "Config.h"
5 
6 #ifndef UNITTEST_NO_EXCEPTIONS
7 	#define UT_TRY(x) try x
8 	#define UT_THROW(x) throw x
9 	#define UT_CATCH(ExceptionType, ExceptionName, CatchBody) catch(ExceptionType& ExceptionName) CatchBody
10 	#define UT_CATCH_ALL(CatchBody) catch(...) CatchBody
11 #else
12 	#define UT_TRY(x) x
13 	#define UT_THROW(x)
14 	#define UT_CATCH(ExceptionType, ExceptionName, CatchBody)
15 	#define UT_CATCH_ALL(CatchBody)
16 #endif
17 
18 #endif
19