Exception Class Reference

Base class for exceptions, stores message and source code location. More...

#include <Exception.h>

List of all members.

Public Types

typedef SourceCodeLocation location_type

Public Member Functions

 Exception (const std::string &msg_r) throw ()
virtual ~Exception () throw ()
virtual const char * what () const throw ()
const location_typewhere () const throw ()
void setLocation (const location_type &loc_r) const throw ()
virtual std::ostream & dumpOn (std::ostream &str) const

Private Attributes

std::string _msg
location_type _loc

Friends

std::ostream & operator<< (std::ostream &str, const Exception &obj_r)


Detailed Description

Base class for exceptions, stores message and source code location.

Fore convenience use macro THROW( Exception("message") );. It automatically stores SOURCECODELOCATION. See class SourceCodeLocation.


Member Typedef Documentation

typedef SourceCodeLocation Exception::location_type
 


Constructor & Destructor Documentation

Exception::Exception const std::string &  msg_r  )  throw () [explicit]
 

Ctor: stores message

virtual Exception::~Exception  )  throw () [virtual]
 


Member Function Documentation

virtual std::ostream& Exception::dumpOn std::ostream &  str  )  const [virtual]
 

Stream output, used by the default std::ostream::operator<<.

void Exception::setLocation const location_type loc_r  )  const throw () [inline]
 

Set source code location.

virtual const char* Exception::what  )  const throw () [virtual]
 

Returns:
Message strored in ctor. Overloads std::exception::what.

const location_type& Exception::where  )  const throw ()
 

Returns:
Source code location if provided.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  str,
const Exception obj_r
[friend]
 

Stream output as ""EXCEPTION: 'what()' AT 'where()'"


Member Data Documentation

location_type Exception::_loc [mutable, private]
 

std::string Exception::_msg [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 15:51:35 2006 for liby2util by  doxygen 1.4.6