Digital Authentication Framework  6.0.1.37
Public Member Functions | Protected Attributes | List of all members
BasicError Class Reference

Simple implementation of DAError. More...

#include <basic_error.h>

Inheritance diagram for BasicError:
DAError

Public Member Functions

virtual int getCode ()
 get error code More...
 
bool setCode (int e)
 Set error code in error code. More...
 
virtual void clear ()
 reset the current error state.
 
virtual void getAsStringUTF8 (std::string &out)
 get error as string message. More...
 
- Public Member Functions inherited from DAError
virtual ~DAError ()
 virtual destructor More...
 
bool isError ()
 test if error has occurred More...
 

Protected Attributes

int m_err
 Error code; see DAError for values.
 

Additional Inherited Members

- Public Types inherited from DAError
enum  {
  SUCCESS = 0, NO_MEMORY = 1, NOT_PROVISIONED = 2, DEVICE_NOT_FOUND = 3,
  NO_MORE_SESSIONS = 4, DEVICE_DISCONNECTED = 5, DEVICE_PROTOCOL_ERR = 6, BAD_AUTH_TOKEN = 7,
  KEY_NOT_FOUND = 8, ATTRIB_NOT_FOUND = 9, MECH_NOT_FOUND = 10, VERIFY_FAILED = 11,
  NOT_IMPLEMENTED = 12, BAD_PARAMETERS = 13, OS_ERROR = 14, UNSUPPORTED_HASH = 15
}
 

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)
virtual

get error as string message.

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

Implements DAError.

virtual int BasicError::getCode ( )
virtual

get error code

Returns
SUCCESS if no error, otherwise NO_MEMORY, NOT_PROVISIONED etc

Implements DAError.

bool BasicError::setCode ( int  e)

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: