21 #ifndef mia_core_errormacro_hh
22 #define mia_core_errormacro_hh
34 #if defined(HAVE_CXXABI_H) && defined(HAVE_EXEINFO_H)
35 void append_stacktrace(ostream& os);
48 template <
typename V,
typename... T>
55 template <
typename... T>
58 std::stringstream msg;
60 #if defined(HAVE_CXXABI_H) && defined(HAVE_EXEINFO_H)
61 append_stacktrace(msg);
79 template <
typename E,
typename... T>
94 #define DEBUG_ASSERT_RELEASE_THROW(cond, msg... ) \
96 throw ::mia::create_exception<std::logic_error>(msg); \
99 #define DEBUG_ASSERT_RELEASE_THROW(cond, msg... ) \
101 std::cerr << "Assertion failed: \'" #cond << "\' " << \
102 __FILE__ << ":" << __LINE__ << " " \
103 << ::mia::__create_message(msg) << "\n"; \
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
#define NS_MIA_END
conveniance define to end the mia namespace
const std::string __create_message(T ...t)
void __append_message(std::ostream &os, const V &v)
E create_exception(T ...t)
helper template to create exceptions with complex messages