AndroMeta  2.0.0
Public Member Functions
Meta::MError Class Reference

Base class for all AndroMeta error exceptions. More...

#include <MError.h>

Inheritance diagram for Meta::MError:
Meta::MInterruptError Meta::MMathError Meta::MParamError Meta::MProcessError Meta::MTypeError Meta::MTimeoutError

List of all members.

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 mstrtype () const throw ()
void setType (const mstr &type) throw ()
bool instanceOf (const mstr &type) const throw ()
MVarvalue () throw ()
const MVarvalue () const throw ()

Detailed Description

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().


Constructor & Destructor Documentation

Meta::MError::MError ( const mstr message) throw ()

Constructor.

Parameters:
msgThe message used when displaying the error.
Meta::MError::MError ( const MError error)

Copy constructor.

virtual Meta::MError::~MError ( ) throw () [virtual]

Destructor.


Member Function Documentation

bool Meta::MError::instanceOf ( const mstr type) const throw ()
Returns:
true if this error is an instance of type.
const char* Meta::MError::msg ( ) const throw ()
Returns:
The raw message associated with this error (as it was constructed with).
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 ()
Returns:
The immediate type of this error.
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]
Returns:
A string containing type, message, and any additional relevant data in order to display the error.

The documentation for this class was generated from the following file: