General IRI utilities
Public Member Functions
CMutexException Class Reference

Mutual exclusion exception class. More...

#include <mutexexceptions.h>

Inheritance diagram for CMutexException:
Inheritance graph
[legend]
Collaboration diagram for CMutexException:
Collaboration graph
[legend]

Public Member Functions

 CMutexException (const std::string &where, const std::string &error_msg)
 Constructor. More...
 
- Public Member Functions inherited from CException
 CException (const std::string &where, const std::string &error_msg)
 Class constructor. More...
 
virtual const std::string & what (void)
 Function to get the error message. More...
 
virtual ~CException () throw ()
 Class destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from CException
std::string error_msg
 Exception error message. More...
 

Detailed Description

This class implements the exceptions for the CMutex class. It does not add any feature to the bease clase CException, but it is implemented to easyly distinguish between different types of exceptions.

In addition to the general exception message added by the base class, this class adds the "[CMutex class] - " string to the user message to identify the class that generated the exception.

Definition at line 36 of file mutexexceptions.h.

Constructor & Destructor Documentation

CMutexException::CMutexException ( const std::string &  where,
const std::string &  error_msg 
)

The constructor calls the base class constructor to add the general exception identifier and then adds the class identifier string "[CMutex class]" and the supplied error message. The total exception message will look like this:

* [Exception caught] - <where>
* Error: [CMutex class] - <error message>
* 
Parameters
wherea null terminated string with the information about the name of the function, the source code filename and the line where the exception was generated. This string must be generated by the HERE macro.
error_msga null terminated string that contains the error message. This string may have any valid character and there is no limit on its length.

Definition at line 25 of file mutexexceptions.cpp.

References CException::error_msg.


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