38 #ifndef FAPIDXX_ERROR_H_VERSION 40 #define FAPIDXX_ERROR_H_VERSION \ 41 "FAPIDXX_ERROR_H V1.0" 82 const char* condition);
87 const char* condition);
95 virtual void report()
const;
122 const char* condition);
126 virtual void report()
const;
148 #define FAPIDXX_Xassert(C,M,E) \ 149 if (!(C)) { throw( E ( M , __FILE__, __LINE__, #C )); } 157 #define FAPIDXX_assert(C,M) FAPIDXX_Xassert( C , M , fapidxx::error::Exception ) 165 #define FAPIDXX_abort(M) \ 166 throw( fapidxx::error::Exception ( M , __FILE__, __LINE__ )) 168 #define FAPIDXX_illegal FAPIDXX_abort("illegal call!") 178 #define FAPIDXX_report_assert(C,M,V) \ 180 fapidxx::report_violation(M, __FILE__, __LINE__, #C); \ 181 std::cerr << "* comment: " << V << std::endl; \ 182 std::cerr << std::endl; \ 195 #define FAPIDXX_nonfatal_assert(F,C,M,V) \ 196 if (F) { FAPIDXX_report_assert(C,M,V) } else { FAPIDXX_assert(C,M) } 205 #define FAPIDXX_fuassert(C,U,M) \ 206 if (!(C)) { throw( fapidxx::error::FUException ( U , M , __FILE__, __LINE__, #C )); } 208 #endif // FAPIDXX_ERROR_H_VERSION (includeguard) static bool Mreport_on_construct
Shall we print to cerr at construction time?
virtual void report() const
Screen report.
Exception()
Creates exception with no explaning comments.
const char * Mcondition
pointer to assertion condition text string
const char * Mmessage
pointer to message string
virtual ~FUException()
provide explicit virtual destructor
virtual ~Exception()
provide explicit virtual destructor
static void dont_report_on_construct()
Issue NO screen report on construction of exception.
FUException(const int &unit, const char *message, const char *file, const int &line, const char *condition)
Create with message, failed assertion, and code position.
Base class for exceptions.
const char * Mfile
pointer to file name string
void base_report() const
Screen report.
virtual void report() const
Screen report.
const int & Mline
pointer to line number in source file
static void report_on_construct()
Issue a screen report on construction of exception.