37 #ifndef STFINV_ERROR_H_VERSION 39 #define STFINV_ERROR_H_VERSION \ 70 const char* condition);
75 const char* condition);
83 virtual void report()
const;
115 const char* condition);
131 #define STFINV_Xassert(C,M,E) \ 132 if (!(C)) { throw( E ( M , __FILE__, __LINE__, #C )); } 140 #define STFINV_assert(C,M) STFINV_Xassert( C , M , stfinv::Exception ) 147 #define STFINV_abort(M) \ 148 throw( stfinv::Exception ( M , __FILE__, __LINE__ )) 154 #define STFINV_illegal STFINV_abort("illegal call!") 164 #define STFINV_report_assert(C,M,V) \ 166 stfinv::report_violation(M, __FILE__, __LINE__, #C); \ 167 std::cerr << "* comment: " << V << std::endl; \ 168 std::cerr << std::endl; \ 181 #define STFINV_nonfatal_assert(F,C,M,V) \ 182 if (F) { STFINV_report_assert(C,M,V) } else { STFINV_assert(C,M) } 184 #endif // STFINV_ERROR_H_VERSION (includeguard) static bool Mreport_on_construct
Shall we print to cerr at construction time?
Base class for exceptions.
Root namespace of library.
Exception()
Creates exception with no explaning comments.
virtual ~Exception()
provide explicit virtual destructor
static void report_on_construct()
Issue a screen report on construction of exception.
void base_report() const
Screen report.
void report_violation(const char *message, const char *file, const int &line, const char *condition)
report violation of assertion
virtual void report() const
Screen report.
const int & Mline
pointer to line number in source file
static void dont_report_on_construct()
Issue NO screen report on construction of exception.
const char * Mmessage
pointer to message string
const char * Mcondition
pointer to assertion condition text string
const char * Mfile
pointer to file name string