Public Member Functions | Private Attributes | Friends | List of all members
gnsstk::ExceptionLocation Class Reference

Detailed Description

A class for recording locations (in the source code) of exceptions being thrown.

Definition at line 69 of file Exception.hpp.

#include <Exception.hpp>

Public Member Functions

void dump (std::ostream &s) const
 
 ExceptionLocation (const std::string &filename=std::string(), const std::string &funcName=std::string(), const unsigned long &lineNum=0)
 
std::string getFileName () const
 Accessor for name of source file where exception occurred. More...
 
std::string getFunctionName () const
 Accessor for name of function where exception occurred. More...
 
unsigned long getLineNumber () const
 Accessor for line of source file where exception occurred. More...
 
std::string what () const
 Dump to a string. More...
 
 ~ExceptionLocation ()
 

Private Attributes

std::string fileName
 Name of source file where exception occurred. More...
 
std::string functionName
 Name of function where exception occurred. More...
 
unsigned long lineNumber
 Line in source file where exception occurred. More...
 

Friends

std::ostream & operator<< (std::ostream &s, const ExceptionLocation &e)
 

Constructor & Destructor Documentation

◆ ExceptionLocation()

gnsstk::ExceptionLocation::ExceptionLocation ( const std::string &  filename = std::string(),
const std::string &  funcName = std::string(),
const unsigned long &  lineNum = 0 
)
inline

Constructor for location information.

Parameters
[in]filenamename of source file where exception occurred.
[in]funcNamename of function where exception occurred.
[in]lineNumline of source file where exception occurred.

Definition at line 78 of file Exception.hpp.

◆ ~ExceptionLocation()

gnsstk::ExceptionLocation::~ExceptionLocation ( )
inline

Destructor.

Definition at line 88 of file Exception.hpp.

Member Function Documentation

◆ dump()

void gnsstk::ExceptionLocation::dump ( std::ostream &  s) const

Debug output function.

Parameters
[in,out]sstream to which debugging information for this class will be output.

Definition at line 56 of file Exception.cpp.

◆ getFileName()

std::string gnsstk::ExceptionLocation::getFileName ( ) const
inline

Accessor for name of source file where exception occurred.

Definition at line 91 of file Exception.hpp.

◆ getFunctionName()

std::string gnsstk::ExceptionLocation::getFunctionName ( ) const
inline

Accessor for name of function where exception occurred.

Definition at line 94 of file Exception.hpp.

◆ getLineNumber()

unsigned long gnsstk::ExceptionLocation::getLineNumber ( ) const
inline

Accessor for line of source file where exception occurred.

Definition at line 97 of file Exception.hpp.

◆ what()

string gnsstk::ExceptionLocation::what ( ) const

Dump to a string.

Definition at line 186 of file Exception.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const ExceptionLocation e 
)
friend

Output stream operator for ExceptionLocation. This is intended just to dump all the data in the ExceptionLocation to the indicated stream.

Warning
It will not preserve the state of the stream.
Parameters
[in,out]sstream to send ExceptionLocation information to.
[in]eExceptionLocation to "dump".
Returns
a reference to the stream s.

Member Data Documentation

◆ fileName

std::string gnsstk::ExceptionLocation::fileName
private

Name of source file where exception occurred.

Definition at line 124 of file Exception.hpp.

◆ functionName

std::string gnsstk::ExceptionLocation::functionName
private

Name of function where exception occurred.

Definition at line 126 of file Exception.hpp.

◆ lineNumber

unsigned long gnsstk::ExceptionLocation::lineNumber
private

Line in source file where exception occurred.

Definition at line 128 of file Exception.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:44