DATRW++ library: seismic data I/O with multiple formats
|
Base class for exceptions. More...
#include <exception.h>
Public Member Functions | |
Exception () | |
Creates exception with no explaning comments. More... | |
Exception (const std::string &message) | |
Creates an exception with an explanation message. More... | |
Exception (const std::string &message, const std::string &condition) | |
Creates an exception with message and failed assertion. More... | |
Exception (const std::string &message, const std::string &file, const int &line, const std::string &condition) | |
Create with message, failed assertion, and code position. More... | |
Exception (const std::string &message, const std::string &file, const int &line) | |
Create with message and code position. More... | |
virtual | ~Exception () |
provide explicit virtual destructor More... | |
virtual void | report () const |
Screen report. More... | |
Static Public Member Functions | |
static void | dont_report_on_construct () |
Issue NO screen report on construction of exception. More... | |
static void | report_on_construct () |
Issue a screen report on construction of exception. More... | |
static void | report_on_construct_flag (const bool &flag) |
set report on construct flag More... | |
static bool | report_on_construct_flag () |
return report on construct flag More... | |
Protected Member Functions | |
void | base_report () const |
Screen report. More... | |
Private Attributes | |
std::string | Mcondition |
pointer to assertion condition text string More... | |
std::string | Mfile |
pointer to file name string More... | |
const int & | Mline |
pointer to line number in source file More... | |
std::string | Mmessage |
pointer to message string More... | |
Static Private Attributes | |
static bool | Mreport_on_construct =true |
Shall we print to cerr at construction time? More... | |
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().
Definition at line 62 of file exception.h.