xref: /haiku/src/kits/package/manager/PackageManagerUtils.h (revision 4b7e219688450694efc9d1890f83f816758c16d3)
1 /*
2  * Copyright 2013, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef PACKAGE_MANAGER_UTILS_H
6 #define PACKAGE_MANAGER_UTILS_H
7 
8 
9 #include <package/manager/Exceptions.h>
10 
11 
12 #define DIE(...)											\
13 do {														\
14 	throw BFatalErrorException(__VA_ARGS__);				\
15 } while(0)
16 
17 
18 #define DIE_DETAILS(details, ...)									\
19 do {																\
20 	throw BFatalErrorException(__VA_ARGS__).SetDetails(details);	\
21 } while(0)
22 
23 
24 #endif	// PACKAGE_MANAGER_UTILS_H
25