ML Reference
|
The class TreeNodeException is the base class for all exceptions thrown by the class TreeNode and all derived classes. More...
#include <mlTreeNode.h>
Public Member Functions | |
TreeNodeException (int errorCode=0, const char *msg=nullptr) | |
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. | |
The class TreeNodeException is the base class for all exceptions thrown by the class TreeNode and all derived classes.
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 94 of file mlTreeNode.h.
ml::TreeNodeException::TreeNodeException | ( | int | errorCode = 0, |
const char * | msg = nullptr ) |
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.
|
inlinevirtual |
Destructor.
Definition at line 108 of file mlTreeNode.h.
|
inline |
Returns the error code.
Definition at line 111 of file mlTreeNode.h.
|
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 pointer is guaranteed to be valid at least until the exception object from which it is obtained is destroyed
|
protected |
The error code of the exception.
Definition at line 125 of file mlTreeNode.h.