| Disk ARchive 2.8.3 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
libdar::Egeneric Class Referenceabstract
API

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

`#include <erreurs.hpp>`

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

## Public Member Functions
| Egeneric (const std::string &source, const std::string &message)
| the constructor
| Egeneric (const Egeneric &ref)=default
| copy constructor
| Egeneric (Egeneric &&ref)=default
| move constructor
Egeneric & | operator= (const Egeneric &ref)=default
| assignment operator
Egeneric & | operator= (Egeneric &&ref) noexcept=default
| move operator
virtual | ~Egeneric ()=default
| the destructor
void | stack (const std::string &passage, const std::string &message="")
| add more detailed couple of information to the exception
void | stack (const std::string &&passage, const std::string &&message="")
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
std::string | dump_str () const
| return a string result of the exception information dump
| Egeneric (const std::string &source, const std::string &message)
| the constructor
| Egeneric (const Egeneric &ref)=default
| copy constructor
| Egeneric (Egeneric &&ref)=default
| move constructor
Egeneric & | operator= (const Egeneric &ref)=default
| assignment operator
Egeneric & | operator= (Egeneric &&ref) noexcept=default
| move operator
virtual | ~Egeneric ()=default
| the destructor
void | stack (const std::string &passage, const std::string &message="")
| add more detailed couple of information to the exception
void | stack (const std::string &&passage, const std::string &&message="")
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
std::string | dump_str () const
| return a string result of the exception information dump

## Protected Member Functions
virtual std::string | exceptionID () const =0
virtual std::string | exceptionID () const =0

## Private Attributes
std::deque< niveau > | pile

## Static Private Attributes
static const std::string | empty_string

## 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 51 of file dar64-2.8.3-win64/include/dar/erreurs.hpp.

## Member Function Documentation

## ◆ find_object() [1/2]

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

## ◆ find_object() [2/2]

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

## ◆ get_message() [1/2]

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 82 of file dar64-2.8.3-win64/include/dar/erreurs.hpp.

## ◆ get_message() [2/2]

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 82 of file src/libdar/erreurs.hpp.

## ◆ get_source() [1/2]

const std::string & libdar::Egeneric::get_source | ( |  | ) | const
| inline

get the call function which has thrown this exception

Definition at line 85 of file dar64-2.8.3-win64/include/dar/erreurs.hpp.

## ◆ get_source() [2/2]

const std::string & libdar::Egeneric::get_source | ( |  | ) | const
| inline

get the call function which has thrown this exception

Definition at line 85 of file src/libdar/erreurs.hpp.

## ◆ stack() [1/4]

void libdar::Egeneric::stack | ( | const std::string && | passage,
|  | const std::string && | message = "" )
| inline

Definition at line 74 of file dar64-2.8.3-win64/include/dar/erreurs.hpp.

## ◆ stack() [2/4]

void libdar::Egeneric::stack | ( | const std::string && | passage,
|  | const std::string && | message = "" )
| inline

Definition at line 74 of file src/libdar/erreurs.hpp.

## ◆ stack() [3/4]

void libdar::Egeneric::stack | ( | const std::string & | passage,
|  | const std::string & | message = "" )
| inline

add more detailed couple of information to the exception

Definition at line 73 of file dar64-2.8.3-win64/include/dar/erreurs.hpp.

## ◆ stack() [4/4]

void libdar::Egeneric::stack | ( | const std::string & | passage,
|  | const std::string & | message = "" )
| inline

add more detailed couple of information to the exception

Definition at line 73 of file src/libdar/erreurs.hpp.

## Member Data Documentation

## ◆ empty_string

const std::string libdar::Egeneric::empty_string
| static private

Definition at line 118 of file dar64-2.8.3-win64/include/dar/erreurs.hpp.

## ◆ pile

std::deque< niveau > libdar::Egeneric::pile
| private

Definition at line 116 of file dar64-2.8.3-win64/include/dar/erreurs.hpp.

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

- dar64-2.8.3-win64/include/dar/erreurs.hpp
- src/libdar/erreurs.hpp