![]() |
Utility
|
An Exception thrown by classes in the idaeim namespace. More...
#include <Exception.hh>
Public Member Functions | |
Exception (const std::string &message="", const char *caller_ID=NULL) | |
Creates an Exception containing a message. | |
void | message (const std::string &message) |
Sets a new message string. | |
std::string | message () const throw () |
Gets the user-provided caller_ID and message string. | |
const char * | what () const throw () |
Gets a C-string describing what produced the Exception. | |
virtual | ~Exception () throw () |
Static Public Attributes | |
static const char *const | ID |
Class identification name with source code version and date. |
An Exception thrown by classes in the idaeim namespace.
This class is the root of of the idaeim hierarchy of classes used to signal types of Exceptions:
Associated with an unrecoverable error condition.
Each idaeim module is expected to provide a set of one or more exception subclasses that more specifically identify exception occurances within the module.
For all Exceptions a message string is provided that describes the reason for the Exception. The message method will return this message, while the what method will prepend the Exception class ID to the message.
Exception | ( | const std::string & | message = "" , |
const char * | caller_ID = NULL |
||
) | [explicit] |
Creates an Exception containing a message.
If the message ends with a new-line character ('\n'), it is removed (but only one is removed). If a caller_ID is provided, it preceeds the message string separated by a new-line character.
message | The message string. |
caller_ID | An optional C-string (NULL terminated char*) identifying the source of the Exception. |
virtual ~Exception | ( | ) | throw () [inline, virtual] |
const char* what | ( | ) | const throw () |
std::string message | ( | ) | const throw () |
Gets the user-provided caller_ID and message string.
void message | ( | const std::string & | message | ) |
Sets a new message string.
If the message ends with a new-line character ('\n'), it is removed (but only one is removed). If a caller_ID was provided when the Exception was created it remains; the new message is appended in place of the previous message.
message | A string to replace the previous message. |
const char* const ID [static] |
Class identification name with source code version and date.