libstorage-ng
Public Member Functions | Friends | List of all members
storage::CodeLocation Class Reference

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.
 

Detailed Description

Helper class for UI exceptions: Store BASE_FILE, FUNCTION and LINE.

Construct this using the ST_EXCEPTION_CODE_LOCATION macro.

Constructor & Destructor Documentation

◆ CodeLocation()

storage::CodeLocation::CodeLocation ( const std::string &  file_r,
const std::string &  func_r,
int  line_r 
)
inline

Constructor.

Commonly called using the ST_EXCEPTION_CODE_LOCATION macro.


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