7 #ifndef INCLUDED_IEXMACROS_H
8 #define INCLUDED_IEXMACROS_H
33 #define THROW(type, text) \
37 std::stringstream _iex_throw_s; \
38 _iex_throw_s << text; \
39 throw type (_iex_throw_s); \
67 #define APPEND_EXC(exc, text) \
70 std::stringstream _iex_append_s; \
71 _iex_append_s << text; \
72 exc.append (_iex_append_s); \
76 #define REPLACE_EXC(exc, text) \
79 std::stringstream _iex_replace_s; \
80 _iex_replace_s << text; \
81 exc.assign (_iex_replace_s); \
96 #define THROW_ERRNO(text) \
99 std::stringstream _iex_throw_errno_s; \
100 _iex_throw_errno_s << text; \
101 ::IEX_NAMESPACE::throwErrnoExc (_iex_throw_errno_s.str()); \
115 #define ASSERT(assertion, type, text) \
118 if( bool(assertion) == false ) \
120 THROW( type, text ); \
135 #define LOGIC_ASSERT(assertion) \
137 IEX_NAMESPACE::LogicExc, \
138 __FILE__ << "(" << __LINE__ << "): logical assertion failed: " << #assertion )
IEX_EXPORT void iex_debugTrap()