ExceptionLocation Class Reference

#include <Exception.hpp>

List of all members.


Detailed Description

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

Definition at line 69 of file Exception.hpp.

Public Member Functions

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

Friends

std::ostream & operator<< (std::ostream &s, const ExceptionLocation &e) throw ()
 Output stream operator for ::ExceptionLocation.


Constructor & Destructor Documentation

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

Constructor for location information.

Parameters:
filename name of source file where exception occurred.
funcName name of function where exception occurred.
lineNum line of source file where exception occurred.

Definition at line 78 of file Exception.hpp.

~ExceptionLocation  )  throw () [inline]
 

Destructor.

Definition at line 89 of file Exception.hpp.


Member Function Documentation

void dump std::ostream &  s  )  const throw ()
 

Debug output function.

Parameters:
s stream to output debugging information for this class to.

Definition at line 56 of file Exception.cpp.

Referenced by ExceptionLocation::what().

std::string getFileName  )  const throw () [inline]
 

Accessor for name of source file where exception occurred.

Definition at line 92 of file Exception.hpp.

Referenced by Logger::log().

std::string getFunctionName  )  const throw () [inline]
 

Accessor for name of function where exception occurred.

Definition at line 96 of file Exception.hpp.

Referenced by Logger::log().

unsigned long getLineNumber  )  const throw () [inline]
 

Accessor for line of source file where exception occurred.

Definition at line 100 of file Exception.hpp.

Referenced by Logger::log().

string what  )  const throw ()
 

Dump to a string.

Definition at line 189 of file Exception.cpp.

References ExceptionLocation::dump().


Friends And Related Function Documentation

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

Output stream operator for ::ExceptionLocation.

This is intended just to dump all the data in the ::ExceptionLocation to the indicated stream.

Warning:
Warning: It will _not_ preserve the state of the stream.
Parameters:
s stream to send ::ExceptionLocation information to.
e ::ExceptionLocation to "dump".
Returns:
a reference to the stream s.


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 03:31:35 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1