]> www.ginac.de Git - ginac.git/blob - check/error_report.hpp
G_numeric: put convergence/acceleration transofrmations into helper functions.
[ginac.git] / check / error_report.hpp
1 #ifndef GINAC_CHECK_ERROR_REPORT_HPP
2 #define GINAC_CHECK_ERROR_REPORT_HPP
3 #include <sstream>
4 #include <stdexcept>
5
6 #define bug_on(cond, what)                              \
7 do {                                                    \
8 if (cond) {                                             \
9         std::ostringstream err_stream;                  \
10         err_stream << __FILE__ << ':' << __LINE__       \
11                    << what;                             \
12         throw std::logic_error(err_stream.str());       \
13 }                                                       \
14 } while (0)
15
16 #endif // GINAC_CHECK_ERROR_REPORT_HPP
17