|
General IRI utilities
|
CTime exception class. More...
#include <ctimeexceptions.h>


Public Member Functions | |
| CTimeException (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... | |
This class implements the exceptions for the CTime class.
Also, similarly to other exception classes, it appends a class identifer string ("[CTime 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 CTime objects.
Definition at line 37 of file ctimeexceptions.h.
| CTimeException::CTimeException | ( | 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 "[CTime 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> * [CTime class] - <error message> *
| where | a 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_msg | a 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 ctimeexceptions.cpp.
References CException::error_msg.
1.8.6