# libdar::Egeneric Class Reference
[API]

this is the parent class of all exception classes. More...

`#include <erreurs.hpp>`

Inherited by libdar::Ebug, libdar::Ecompilation, libdar::Edata, libdar::Edeci, libdar::Efeature, libdar::Ehardware, libdar::Einfinint, libdar::Elibcall, libdar::Elimitint, libdar::Ememory, libdar::Erange, libdar::Escript, libdar::Ethread_cancel, and libdar::Euser_abort.

List of all members.

## Public Member Functions
| Egeneric (const std::string &source, const std::string &message)
| the constructor
| Egeneric (const Egeneric &ref)
| copy constructor
virtual | ~Egeneric ()
| the destructor
virtual void | stack (const std::string &passage, const std::string &message="")
| rarely used mechanism to keep trace of calls the exception has been exiting from
const std::string & | get_message () const
| get the message explaing the nature of the exception
const std::string & | get_source () const
| get the call function which has thrown this exception
const std::string & | find_object (const std::string &location) const
| retrieve the objet (object) associated to a given "lieu" (location) from the stack
void | prepend_message (const std::string &context)
| prepend error message by the given string
void | dump () const
| dump all information of the exception to the standard error

## Detailed Description

this is the parent class of all exception classes.

this is a pure virtual class that provide some simple mechanisme to carry the information about the cause of the exception, as well as some a complex mechanim which not used often in libdar that keep trace, for each exception throwing process, of the different calls by which the current exception has been exiting.

Definition at line 53 of file erreurs.hpp.

## Member Function Documentation

const std::string& libdar::Egeneric::find_object | ( | const std::string & | location | ) | const

retrieve the objet (object) associated to a given "lieu" (location) from the stack

Parameters:

  `[in]` | location | key to look for the value of

Returns:
  returns an empty string if key is not found in the stack

const std::string& libdar::Egeneric::get_message | ( |  | ) | const`[inline]`

get the message explaing the nature of the exception

This is probably the only method you will use for all the the exception, as you will not have to create such objects and will only need to get the error message thanks to this method

Definition at line 72 of file erreurs.hpp.

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

- erreurs.hpp