41 #ifndef TF_ERROR_H_VERSION 43 #define TF_ERROR_H_VERSION \ 87 const char* condition);
92 const char* condition);
100 virtual void report()
const;
138 const char* condition);
166 #define TFXX_Xassert(C,M,E) \ 167 if (!(C)) { throw( E ( M , __FILE__, __LINE__, #C )); } 175 #define TFXX_assert(C,M) TFXX_Xassert( C , M , tfxx::error::Exception ) 183 #define TFXX_abort(M) \ 184 throw( tfxx::error::Exception ( M , __FILE__, __LINE__ )) 186 #define TFXX_illegal TFXX_abort("illegal call!") 196 #define TFXX_report_assert(C,M,V) \ 198 tfxx::error::report_violation(M, __FILE__, __LINE__, #C); \ 199 std::cerr << "* comment: " << V << std::endl; \ 200 std::cerr << std::endl; \ 213 #define TFXX_nonfatal_assert(F,C,M,V) \ 214 if (F) { TFXX_report_assert(C,M,V) } else { TFXX_assert(C,M) } 216 #endif // TF_ERROR_H_VERSION (includeguard) virtual ~Exception()
provide explicit virtual destructor
static void restore_report_state()
Restore previous report state.
void report_deprecated(const char *function, const char *reason)
report deprecated function
static void dont_report_on_construct()
Issue NO screen report on construction of exception.
bool report_on_construct_is_true() const
static bool Mreport_on_construct
Shall we print to cerr at construction time?
const char * Mfile
pointer to file name string
int Mline
pointer to line number in source file
static std::stack< bool > Mprevious_report_state
a place to store previous report state
static void report_on_construct()
Issue a screen report on construction of exception.
const char * Mcondition
pointer to assertion condition text string
const char * Mmessage
pointer to message string
Base class for exceptions.
virtual void report() const
Screen report.
Exception()
Creates exception with no explaning comments.
void report_violation(const char *message, const char *file, const int &line, const char *condition)
report violation of assertion
Namespace containing all code of library libtfxx.
void base_report() const
Screen report.