libstorage-ng
Loading...
Searching...
No Matches
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.
 CodeLocation ()
 Default constructor.
const std::string & file () const
 Returns the source file name where the exception occurred.
const std::string & func () const
 Returns the name of the function where the exception occurred.
int line () const
 Returns the source line number where the exception occurred.
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:
  • /home/abuild/rpmbuild/BUILD/libstorage-ng-4.5.263-build/libstorage-ng-4.5.263/storage/Utils/Exception.h