37 #ifndef FOURIER_ERROR_H_VERSION 39 #define FOURIER_ERROR_H_VERSION \ 40 "FOURIER_ERROR_H V1.0" 71 const char* condition);
76 const char* condition);
84 virtual void report()
const;
116 const char* condition);
132 #define FOURIER_Xassert(C,M,E) \ 133 if (!(C)) { throw( E ( M , __FILE__, __LINE__, #C )); } 141 #define FOURIER_assert(C,M) FOURIER_Xassert( C , M , fourier::Exception ) 149 #define FOURIER_abort(M) \ 150 throw( fourier::Exception ( M , __FILE__, __LINE__ )) 152 #define FOURIER_illegal FOURIER_abort("illegal call!") 163 #define FOURIER_report_assert(C,M,V) \ 165 fourier::report_violation(M, __FILE__, __LINE__, #C); \ 166 std::cerr << "* comment: " << V << std::endl; \ 167 std::cerr << std::endl; \ 180 #define FOURIER_nonfatal_assert(F,C,M,V) \ 181 if (F) { FOURIER_report_assert(C,M,V) } else { FOURIER_assert(C,M) } 194 #define FOURIER_debug(C,N,M) \ 196 std::cerr << "DEBUG (" << N << ", " \ 197 << __FILE__ << " line #" << __LINE__ << "):" << std::endl \ 198 << " " << M << std::endl; \ 202 #endif // FOURIER_ERROR_H_VERSION (includeguard) void base_report() const
Screen report.
Exception()
Creates exception with no explaning comments.
const char * Mcondition
pointer to assertion condition text string
void report_violation(const char *message, const char *file, const int &line, const char *condition)
report violation of assertion
const char * Mfile
pointer to file name string
virtual ~Exception()
provide explicit virtual destructor
const int & Mline
pointer to line number in source file
static bool Mreport_on_construct
Shall we print to cerr at construction time?
static void report_on_construct()
Issue a screen report on construction of exception.
virtual void report() const
Screen report.
Base class for exceptions.
static void dont_report_on_construct()
Issue NO screen report on construction of exception.
const char * Mmessage
pointer to message string