class intended for the use in throw statements
More...
|
| Error (const Message &message) |
| Constructor.
|
|
std::string | get_message () const |
|
void | append (const Message &message) |
| Appends a message verbatim to the what string.
|
|
void | append_line (const Message &message) |
| Appends a newline and a message verbatim to the what string.
|
|
virtual const char * | what () const throw () |
|
virtual | ~Error () throw () |
|
class intended for the use in throw statements
The objects of this class store a message (that describes the error when thrown) that can then be displayed in a catch
block
class intended for the use in throw statements
Definition exceptions.h:83
Error(const Message &message)
Constructor.
Definition exceptions.h:92
virtual const char * what() const
Definition exceptions.h:113
small class holding a stringstream
Definition exceptions.h:29
#define _ping_
Definition exceptions.h:12
◆ Error()
dg::Error::Error |
( |
const Message & | message | ) |
|
|
inline |
Constructor.
- Parameters
-
message | An instance of a Message class |
◆ ~Error()
virtual dg::Error::~Error |
( |
| ) |
|
throw | ( | ) | | | |
|
inlinevirtual |
◆ append()
void dg::Error::append |
( |
const Message & | message | ) |
|
|
inline |
Appends a message verbatim to the what string.
- Parameters
-
◆ append_line()
void dg::Error::append_line |
( |
const Message & | message | ) |
|
|
inline |
Appends a newline and a message verbatim to the what string.
- Parameters
-
message | message to append after newline |
◆ get_message()
std::string dg::Error::get_message |
( |
| ) |
const |
|
inline |
◆ what()
virtual const char * dg::Error::what |
( |
| ) |
const |
throw | ( | ) | | | |
|
inlinevirtual |
- Returns
- file, line and the message given in the constructor as a string of char
The documentation for this class was generated from the following file: