libyui
 
Loading...
Searching...
No Matches
YCodeLocation Class Reference

#include <YUIException.h>

Public Member Functions

 YCodeLocation (const std::string &file_r, const std::string &func_r, int line_r)
 
 YCodeLocation ()
 
std::string file () const
 
std::string func () const
 
int line () const
 
std::string asString () const
 

Friends

std::ostream & operator<< (std::ostream &str, const YCodeLocation &obj)
 

Detailed Description

Helper class for UI exceptions: Store FILE, FUNCTION and LINE. Construct this using the YUI_EXCEPTION_CODE_LOCATION macro.

Constructor & Destructor Documentation

◆ YCodeLocation() [1/2]

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

Constructor. Commonly called using the YUI_EXCEPTION_CODE_LOCATION macro.

◆ YCodeLocation() [2/2]

YCodeLocation::YCodeLocation ( )
inline

Default constructor.

Member Function Documentation

◆ asString()

string YCodeLocation::asString ( ) const

Returns the location in normalized string format.

◆ file()

std::string YCodeLocation::file ( ) const
inline

Returns the source file name where the exception occured.

◆ func()

std::string YCodeLocation::func ( ) const
inline

Returns the name of the function where the exception occured.

◆ line()

int YCodeLocation::line ( ) const
inline

Returns the source line number where the exception occured.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & str,
const YCodeLocation & obj )
friend

Stream output

YCodeLocation stream output


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