#include <mlTreeNode.h>

Public Member Functions | |
| TreeNodeException (int errorCode=0, const char *msg=0) | |
| Creates a new exception object with code errorCode and an optional error message. | |
| virtual | ~TreeNodeException () |
| Destructor. | |
| int | getCode () const |
| Returns the error code. | |
| virtual const char * | getMessage () const |
| Returns the error string. | |
Protected Attributes | |
| int | _errorCode |
| The error code of the exception. | |
| const char * | _errorMsg |
| The optional user defined message. | |
This class is not abstract, so you can directly generate TreeNodeExceptions when implementing the TreeNode interface. If the exception you want to throw is not listed yet, you may either add it here (but only if it is an exception that could be useful to all possible TreeNode implementations) or derive from this class and add implementation specific exceptions. If you need an example on how to do this, this has be done for the XMLTreeNode exceptions.
Definition at line 101 of file mlTreeNode.h.
| ml::TreeNodeException::TreeNodeException | ( | int | errorCode = 0, |
|
| const char * | msg = 0 | |||
| ) | [inline] |
Creates a new exception object with code errorCode and an optional error message.
If the error code is known in this class, the corresponding standard error message is returned, including the error code itself. If an additional message is given, it is appended to the standard string.
Definition at line 112 of file mlTreeNode.h.
| virtual ml::TreeNodeException::~TreeNodeException | ( | ) | [inline, virtual] |
| int ml::TreeNodeException::getCode | ( | ) | const [inline] |
Returns the error code.
Definition at line 118 of file mlTreeNode.h.
Referenced by ml::BaseListTemplate< T >::readStateFromTree(), and ml::ListTemplate< T >::readStateFromTree().
| virtual const char* ml::TreeNodeException::getMessage | ( | ) | const [virtual] |
Returns the error string.
If the error code is known in this class, the corresponding standard error message is returned, including the error code itself. If an additional message was specified, it is appended to the standard string. The returned string must be deleted by caller with delete[].
Reimplemented in ml::XMLTreeNodeException.
int ml::TreeNodeException::_errorCode [protected] |
const char* ml::TreeNodeException::_errorMsg [protected] |
1.5.8