6 #ifndef INCLUDED_IEXMACROS_H
7 #define INCLUDED_IEXMACROS_H
31 #define THROW(type, text) \
35 std::stringstream _iex_throw_s; \
36 _iex_throw_s << text; \
37 throw type (_iex_throw_s); \
63 #define APPEND_EXC(exc, text) \
66 std::stringstream _iex_append_s; \
67 _iex_append_s << text; \
68 exc.append (_iex_append_s); \
71 #define REPLACE_EXC(exc, text) \
74 std::stringstream _iex_replace_s; \
75 _iex_replace_s << text; \
76 exc.assign (_iex_replace_s); \
89 #define THROW_ERRNO(text) \
92 std::stringstream _iex_throw_errno_s; \
93 _iex_throw_errno_s << text; \
94 ::IEX_NAMESPACE::throwErrnoExc (_iex_throw_errno_s.str ()); \
106 #define ASSERT(assertion, type, text) \
109 if (bool (assertion) == false) { THROW (type, text); } \
122 #define LOGIC_ASSERT(assertion) \
125 IEX_NAMESPACE::LogicExc, \
126 __FILE__ << "(" << __LINE__ \
127 << "): logical assertion failed: " << #assertion)
IEX_EXPORT void iex_debugTrap()