General IRI utilities
Public Member Functions
CEventTimeoutException Class Reference

Event timeout exception class. More...

#include <eventexceptions.h>

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

Public Member Functions

 CEventTimeoutException (const std::string &event_id)
 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 a special exception for the event server which indicates a timeout. These is actually not an error because a timeout on the activation of an event can be handled by the application and even expected. In addition to the basic error message provided by the base class CException, this exception class provides also the unique identifier of the event that generated the exception.

Also, similarly to other exception classes, it appends a class identifer string ("[Timout] - ") to the error message in order to identify the class that generated the exception.

The base class can be used to catch any exception thrown by the application or also, this class can be used in order to catch only exceptions generated by CEvent objects.

Examples:
test_events.cpp, and test_eventserver.cpp.

Definition at line 146 of file eventexceptions.h.

Constructor & Destructor Documentation

CEventTimeoutException::CEventTimeoutException ( const std::string &  event_id)

The constructor calls the base class constructor to add the general exception identifier and then adds the class identifier string "[Timeout]" and the supplied error message.

It also appends the unique identifier of the event that generated the exception. So, the total exception message will look like this:

* [Exception caught] - 
* [Timeout] - <event id>
* 
Parameters
event_ida null terminated string that contains the event unique identifier. This string must be the one used to access the corresponding event.

Definition at line 41 of file eventexceptions.cpp.

References CException::error_msg.


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