AFF --- A container for numbers (array) by Friederich and Forbriger.
aff::Exception Class Reference

Base class for exceptions. More...

#include <error.h>

Inheritance diagram for aff::Exception:

Public Member Functions

 Exception ()
 Creates exception with no explaning comments. More...
 
 Exception (const char *message)
 Creates an exception with an explanation message. More...
 
 Exception (const char *message, const char *condition)
 Creates an exception with message and failed assertion. More...
 
 Exception (const char *message, const char *file, const int &line, const char *condition)
 Create with message, failed assertion, and code position. More...
 
 Exception (const char *message, const char *file, const int &line)
 Create with message and code position. More...
 
virtual ~Exception ()
 provide virtual destructor More...
 
virtual void report () const
 Screen report. More...
 

Static Public Member Functions

static void report_on_construct ()
 Issue a screen report on construction of exception. More...
 
static void dont_report_on_construct ()
 Issue NO screen report on construction of exception. More...
 

Protected Member Functions

void base_report () const
 Screen report. More...
 

Private Attributes

const char * Mmessage
 pointer to message string More...
 
const char * Mfile
 pointer to file name string More...
 
const int & Mline
 pointer to line number in source file More...
 
const char * Mcondition
 pointer to assertion condition text string More...
 

Static Private Attributes

static bool Mreport_on_construct =true
 Shall we print to cerr at construction time? More...
 

Detailed Description

Base class for exceptions.

This is an exception base class. It holds some information about the reason for throwing the exception. The information is printed to cerr through function report(). This function may be overloaded by a derived type. But its functionality is still accessible through base_report().

The standard behaviour is to print out the message during object initialization. If you don't like this, call dont_report_on_construct().

See also
AFF_Xassert
AFF_assert
AFF_abort

Definition at line 74 of file error.h.


The documentation for this class was generated from the following files: