General IRI utilities
Public Member Functions
CEventServerException Class Reference

Event server exception class. More...

#include <eventexceptions.h>

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

Public Member Functions

 CEventServerException (const std::string &where, const std::string &error_msg, 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 the exceptions for the CEventServer class. 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 ("[CEventServer class] - ") 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 CEventServer objects.

Examples:
test_eventserver.cpp.

Definition at line 92 of file eventexceptions.h.

Constructor & Destructor Documentation

CEventServerException::CEventServerException ( const std::string &  where,
const std::string &  error_msg,
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 "[CEventServer class]" 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] - <where>
* [CEventServer class] - <error message> - <event id>
* 
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.
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 34 of file eventexceptions.cpp.

References CException::error_msg.


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