summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/unittest-cpp/UnitTest++/ExceptionMacros.h
blob: e549c2ce72bc65e9a76b7e4e571708d168288292 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef UNITTEST_EXCEPTIONMACROS_H
#define UNITTEST_EXCEPTIONMACROS_H

#include "Config.h"

#ifndef UNITTEST_NO_EXCEPTIONS
	#define UT_TRY(x) try x
	#define UT_THROW(x) throw x
	#define UT_CATCH(ExceptionType, ExceptionName, CatchBody) catch(ExceptionType& ExceptionName) CatchBody
	#define UT_CATCH_ALL(CatchBody) catch(...) CatchBody
#else
	#define UT_TRY(x) x
	#define UT_THROW(x)
	#define UT_CATCH(ExceptionType, ExceptionName, CatchBody)
	#define UT_CATCH_ALL(CatchBody)
#endif

#endif