Digital Authentication Framework 6.0.1.33
Public Member Functions | Protected Attributes

BasicError Class Reference

Simple implementation of DAError. More...

#include <basic_error.h>

Inheritance diagram for BasicError:
DAError

List of all members.

Public Member Functions

virtual int getCode ()
 get error code
bool setCode (int e)
 Set error code in error code.
virtual void clear ()
 reset the current error state.
virtual void getAsStringUTF8 (std::string &out)
 get error as string message.

Protected Attributes

int m_err
 Error code; see DAError for values.

Detailed Description

Simple implementation of DAError.

Simple DAF implementations can use this as-is; more complex implementations may wish to extend this, e.g. to record error codes returned by hardware devices.


Member Function Documentation

virtual void BasicError::getAsStringUTF8 ( std::string &  errmsg) [inline, virtual]

get error as string message.

Note there is deliberately no success/failure indication for this method.

Implements DAError.

virtual int BasicError::getCode ( ) [inline, virtual]

get error code

Returns:
SUCCESS if no error, otherwise NO_MEMORY, NOT_PROVISIONED etc

Implements DAError.

bool BasicError::setCode ( int  e) [inline]

Set error code in error code.

Parameters:
eError code (see DAError for values).
Returns:
true if success, false if error.

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