|
AndroMeta
2.0.0
|
Base class for all AndroMeta error exceptions. More...
#include <MError.h>
Public Member Functions | |
| MError (const mstr &message) throw () | |
| MError (const MError &error) | |
| virtual | ~MError () throw () |
| virtual const char * | what () const throw () |
| const char * | msg () const throw () |
| const mstr & | type () const throw () |
| void | setType (const mstr &type) throw () |
| bool | instanceOf (const mstr &type) const throw () |
| MVar & | value () throw () |
| const MVar & | value () const throw () |
Base class for all AndroMeta error exceptions.
All AndroMeta framework related errors are a subclass of MError. User errors should subclass MError as well whenever possible. MError is constructed with a messsage and additional mvar data may be attached. An optional set of types may be set for the MError which specify the subclasses that the error belongs to and direct class name in that order. This is usually done in the constructor with successive calls to setType().
| Meta::MError::MError | ( | const mstr & | message | ) | throw () |
Constructor.
| msg | The message used when displaying the error. |
| Meta::MError::MError | ( | const MError & | error | ) |
Copy constructor.
| virtual Meta::MError::~MError | ( | ) | throw () [virtual] |
Destructor.
| bool Meta::MError::instanceOf | ( | const mstr & | type | ) | const throw () |
| const char* Meta::MError::msg | ( | ) | const throw () |
| void Meta::MError::setType | ( | const mstr & | type | ) | throw () |
Multiple calls to setType() calls are made to specify the error classes that this error belongs to, with the last being its immediate type. This is usually done in the MError subclass constructor. e.g: MTimeoutError which is an MInterruptError which is an MError, would call:
setType("MInterruptError"); setType("MTimeoutError");
in its constructor.
| const mstr& Meta::MError::type | ( | ) | const throw () |
| MVar& Meta::MError::value | ( | ) | throw () |
Attach or retrieve mvar data assciated with this error.
| const MVar& Meta::MError::value | ( | ) | const throw () |
Retrieve mvar data assciated with this error.
| virtual const char* Meta::MError::what | ( | ) | const throw () [virtual] |
1.7.6.1