36 #define TF_ERROR_CC_VERSION \ 40 #include <tfxx/error.h> 54 Mmessage(NULL), Mfile(NULL), Mline(0), Mcondition(NULL)
59 Mmessage(message), Mfile(NULL), Mline(0), Mcondition(NULL)
64 const char* condition):
65 Mmessage(message), Mfile(NULL), Mline(0), Mcondition(condition)
72 Mmessage(message), Mfile(file), Mline(line), Mcondition(NULL)
79 const char* condition):
80 Mmessage(message), Mfile(file), Mline(line), Mcondition(condition)
117 cerr <<
"Exception report:" << endl;
120 cerr <<
" No message" << endl;
124 cerr <<
" message: " <<
Mmessage << endl;
128 cerr <<
" triggered in \"" <<
Mfile <<
"\" at line #" <<
Mline << endl;
132 cerr <<
" by test condition:" << endl
144 const char* condition)
146 std::cerr << std::endl;
147 std::cerr <<
"VIOLATION of condition: " << condition << std::endl;
148 std::cerr <<
"* in " << file <<
" at line " << line << std::endl;
149 std::cerr <<
"* message: " << message << std::endl;
158 std::cerr <<
"WARNING: program uses deprecated function in libtfxx\n" 159 <<
"* " <<
function << std::endl;
160 std::cerr <<
"* This function should no longer be used because\n" 161 <<
"* " << reason << std::endl;
162 std::cerr <<
"* Please place a ticket at " 163 "http://git.scc.kit.edu:Seitosh/Seitosh" 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
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.