Error location class. More...
#include <error.hpp>
Public Member Functions | |
ErrorLocation () | |
Default constructor for error location. More... | |
ErrorLocation (const char *file, int line, const char *func) | |
Constructor for setting error location. More... | |
std::string | file (void) |
Return file name of location. More... | |
int | line (void) |
Return line number of location. More... | |
std::string | func (void) |
Return function name of location. More... | |
Error location class.
Container to store the location (source file name, line number and function name) where the error happened. Used for debugging purposes. Macro ERROR_LOCATION is defined for convenient use of class.
ErrorLocation::ErrorLocation | ( | ) |
Default constructor for error location.
Stores a null location.
ErrorLocation::ErrorLocation | ( | const char * | file, |
int | line, | ||
const char * | func | ||
) |
Constructor for setting error location.
This constructor is conveniently called with ERROR_LOCATION macro.
std::string ErrorLocation::file | ( | void | ) |
Return file name of location.
std::string ErrorLocation::func | ( | void | ) |
Return function name of location.
int ErrorLocation::line | ( | void | ) |
Return line number of location.