pthread_exception Class Reference

An exception object to carry information related to failures of pthread library calls. More...

#include <exceptions.h>

Inheritance diagram for pthread_exception:

Inheritance graph
[legend]
Collaboration diagram for pthread_exception:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 pthread_exception (const char *f, const int l, const int r, const std::string &m)
 Build a pthread_exception from the given parameters.
 ~pthread_exception () throw ()
const char * what (void) const throw ()
 Return a string describing this pthread error.

Private Attributes

std::string description
 Description of attempted pthread operation.
std::string filename
 Source filename from where thrown.
int line_number
 Line number of source file.
int result_code
 Return value from pthread library call.


Detailed Description

An exception object to carry information related to failures of pthread library calls.

This class will construct a string describing the failure from a pthread library call. Generally, these are only constructed by using the PTHREAD_CHECK_AND_THROW macro.

Definition at line 78 of file exceptions.h.


Constructor & Destructor Documentation

pthread_exception::pthread_exception ( const char *  file,
const int  line,
const int  rc,
const std::string &  str 
)

Build a pthread_exception from the given parameters.

This will copy in the parameters into our local member variables, and build the std::string _what. The string is built at construction so that pthread_exception::what() won't cause any sort of out-of-memory condition, since it can't throw...

Parameters:
file The name of the source file where this occured
line The line number in the source file
rc The return/error code from the pthread library call
str A string describing the operation that was being attemped

Definition at line 25 of file exceptions.cc.

References CMException::_what, description, filename, line_number, and result_code.

pthread_exception::~pthread_exception (  )  throw () [inline]

Definition at line 82 of file exceptions.h.


Member Function Documentation

const char * pthread_exception::what ( void   )  const throw () [virtual]

Return a string describing this pthread error.

The string reported was generated at our construction and simply needs to be returned.

Reimplemented from CMException.

Definition at line 43 of file exceptions.cc.

References CMException::_what.

Referenced by Incoming::listener_thread(), BiDirConn::reader_thread(), and Outlet::writer_thread().

Here is the caller graph for this function:


Member Data Documentation

std::string pthread_exception::description [private]

Description of attempted pthread operation.

Definition at line 87 of file exceptions.h.

Referenced by pthread_exception().

std::string pthread_exception::filename [private]

Source filename from where thrown.

Definition at line 88 of file exceptions.h.

Referenced by pthread_exception().

Line number of source file.

Definition at line 89 of file exceptions.h.

Referenced by pthread_exception().

Return value from pthread library call.

Definition at line 90 of file exceptions.h.

Referenced by pthread_exception().


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

Generated on Tue May 13 11:32:50 2008 for consmgr by  doxygen 1.5.5