50 #ifndef DATRW_ERROR_H_VERSION 52 #define DATRW_ERROR_H_VERSION \ 76 #define DATRW_Xassert(C,M,E) \ 79 std::ostringstream oss; \ 81 throw( E ( oss.str() , __FILE__, __LINE__, #C )); \ 92 #define DATRW_assert(C,M) DATRW_Xassert( C , M , datrw::Exception ) 101 #define DATRW_abort(M) \ 103 std::ostringstream oss; \ 105 throw( datrw::Exception ( oss.str() , __FILE__, __LINE__ )); \ 108 #define DATRW_illegal DATRW_abort("Illegal call within the library!\n" \ 109 "This must be considered a bug. Please report the issue at\n" \ 110 "https://git.scc.kit.edu/Seitosh/Seitosh") 120 #define DATRW_report_assert(C,M) \ 123 std::ostringstream oss; \ 125 datrw::util::report_violation(datrw::util::Fnonfatal, \ 126 oss.str(), __FILE__, __LINE__, #C); \ 138 #define DATRW_nonfatal_assert(F,C,M) \ 139 if (F) { DATRW_report_assert(C,M) } else { DATRW_assert(C,M) } 148 #define DATRW_warning(N,M) \ 150 std::ostringstream oss; \ 151 oss << "in function \"" << N << "\":\n" << M; \ 152 datrw::util::report_violation(datrw::util::Fwarning, \ 153 oss.str(), __FILE__, __LINE__, ""); \ 156 #endif // DATRW_ERROR_H_VERSION (includeguard) libdatrwxx exception class (prototypes)
report errors and warnings (prototypes)