libstorage-ng
|
Helper class for UI exceptions: Store BASE_FILE, FUNCTION and LINE. More...
#include <Exception.h>
Public Member Functions | |
CodeLocation (const std::string &file_r, const std::string &func_r, int line_r) | |
Constructor. More... | |
CodeLocation () | |
Default constructor. | |
const std::string & | file () const |
Returns the source file name where the exception occured. | |
const std::string & | func () const |
Returns the name of the function where the exception occured. | |
int | line () const |
Returns the source line number where the exception occured. | |
std::string | asString () const |
Returns the location in normalized string format. | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const CodeLocation &obj) |
Stream output. | |
Helper class for UI exceptions: Store BASE_FILE, FUNCTION and LINE.
Construct this using the ST_EXCEPTION_CODE_LOCATION macro.
|
inline |
Constructor.
Commonly called using the ST_EXCEPTION_CODE_LOCATION macro.