Exception utility.
More...
#include <Exception.hpp>
|
std::string | _typeMsg |
| Basic exception message indicating the type of exception. More...
|
|
Exception utility.
Custom class for exceptions.
NOMAD uses this type of exceptions. It indicates the file and line number at which a throw is made.
Example
throw Exception(__FILE__, __LINE__,
"an error message");
Definition at line 86 of file WriteAttributeDefinitionFile.cpp.
◆ Exception() [1/2]
Exception::Exception |
( |
size_t |
line, |
|
|
const std::string & |
msg |
|
) |
| |
|
inline |
◆ ~Exception() [1/2]
virtual Exception::~Exception |
( |
void |
| ) |
|
|
inlinevirtual |
◆ Exception() [2/2]
Exception::Exception |
( |
const std::string & |
file, |
|
|
const size_t |
line, |
|
|
const std::string & |
msg |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
file | A string corresponding to the file where the exception is thrown – IN |
line | An integer corresponding to the line number at which the exception is thrown – IN. |
msg | A string corresponding to the error message – IN. |
Definition at line 93 of file Exception.hpp.
◆ ~Exception() [2/2]
virtual Exception::~Exception |
( |
| ) |
|
throw | ( | |
| ) | | |
|
inlinevirtual |
◆ getLineNumber()
size_t Exception::getLineNumber |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ what() [1/2]
const char* Exception::what |
( |
| ) |
const |
throw | ( | |
| ) | | |
Access to the error message.
- Returns
- A string with the error message.
◆ what() [2/2]
const char* Exception::what |
( |
void |
| ) |
const |
|
inlinenoexcept |
◆ _file
std::string Exception::_file |
|
private |
File where the exception is thrown.
Definition at line 77 of file Exception.hpp.
◆ _line
◆ _typeMsg
std::string Exception::_typeMsg |
|
protected |
Basic exception message indicating the type of exception.
Definition at line 81 of file Exception.hpp.
◆ _what
std::string Exception::_what |
|
mutableprivate |
The documentation for this class was generated from the following files: