40 #define AFF_ERROR_CC_VERSION \ 56 Mmessage(0), Mfile(0), Mline(0), Mcondition(0)
61 Mmessage(message), Mfile(0), Mline(0), Mcondition(0)
66 const char* condition):
67 Mmessage(message), Mfile(0), Mline(0), Mcondition(condition)
74 Mmessage(message), Mfile(file), Mline(line), Mcondition(0)
81 const char* condition):
82 Mmessage(message), Mfile(file), Mline(line), Mcondition(condition)
106 cerr <<
"Exception report:" << endl;
109 cerr <<
" No message" << endl;
113 cerr <<
" message: " <<
Mmessage << endl;
117 cerr <<
" triggered in \"" <<
Mfile <<
"\" at line #" <<
Mline << endl;
121 cerr <<
" by condition:" << endl
131 Exception(
"ERROR: memory allocation failed!"), Mn(n), Msize(size) { }
137 std::cout <<
" You requested " <<
Mn <<
" memory locations of " 138 <<
Msize <<
" Bytes size." << std::endl;
Root namespace of library.
AllocException(const Tsize &n, const Tsize &size)
take number of requested elements and their size
const char * Mmessage
pointer to message string
Exception()
Creates exception with no explaning comments.
virtual void report() const
Screen report.
static bool Mreport_on_construct
Shall we print to cerr at construction time?
virtual void report() const
Screen report.
static void report_on_construct()
Issue a screen report on construction of exception.
exceptions and error handling macros (prototypes)
Base class for exceptions.
const int & Mline
pointer to line number in source file
const char * Mcondition
pointer to assertion condition text string
const char * Mfile
pointer to file name string
Tsize Mn
members to remember
static void dont_report_on_construct()
Issue NO screen report on construction of exception.
void base_report() const
Screen report.
size_t Tsize
Type to hold the size of an array dimension.