LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
logicalaccess::CardException Class Reference

#include <myexception.hpp>

Inheritance diagram for logicalaccess::CardException:
logicalaccess::LibLogicalAccessException

Public Types

enum  ErrorType {
  DEFAULT , EXECUTION_ERROR , MEMORY_FAILURE , WRONG_LENGTH ,
  INVALID_CLA_BYTE , COMMAND_INCOMPATIBLE , SECURITY_STATUS , AUTHENTICATION_FAILURE ,
  REFERENCE_KEY_UNUSABLE , COMMAND_NOT_ALLOWED , KEY_NUMBER_INVALID , FUNCTION_NOT_SUPPORTED ,
  NOT_FOUND , WRONG_P1_P2 , WRONG_LE , WRONG_INSTRUCTION ,
  WRONG_CLASS , AID_NOT_FOUND , UNKOWN_ERROR
}
 

Public Member Functions

 CardException (const std::string &message)
 
 CardException (const std::string &message, ErrorType error)
 
enum ErrorType error_code () const
 
- Public Member Functions inherited from logicalaccess::LibLogicalAccessException
 LibLogicalAccessException (const char *message)
 
 LibLogicalAccessException (const std::string &message)
 
virtual ~LibLogicalAccessException () NOEXCEPT
 
const char * what () const NOEXCEPT override
 

Protected Attributes

enum ErrorType error_type_
 
- Protected Attributes inherited from logicalaccess::LibLogicalAccessException
std::string msg_
 

Detailed Description

Exception class to notify of error on card operation.

If a command fails and the error is known, a CardException corresponding
to the error will be thrown by the library.

Member Enumeration Documentation

◆ ErrorType

This is a general enumeration to describe possible error. This is usefull because not all readers / card combination fail with the same error code for the same error.

Enumerator
DEFAULT 
EXECUTION_ERROR 
MEMORY_FAILURE 
WRONG_LENGTH 
INVALID_CLA_BYTE 
COMMAND_INCOMPATIBLE 
SECURITY_STATUS 
AUTHENTICATION_FAILURE 
REFERENCE_KEY_UNUSABLE 
COMMAND_NOT_ALLOWED 
KEY_NUMBER_INVALID 
FUNCTION_NOT_SUPPORTED 
NOT_FOUND 
WRONG_P1_P2 
WRONG_LE 
WRONG_INSTRUCTION 
WRONG_CLASS 
AID_NOT_FOUND 
UNKOWN_ERROR 

Constructor & Destructor Documentation

◆ CardException() [1/2]

logicalaccess::CardException::CardException ( const std::string &  message)
inlineexplicit

◆ CardException() [2/2]

logicalaccess::CardException::CardException ( const std::string &  message,
ErrorType  error 
)
inline

Member Function Documentation

◆ error_code()

enum ErrorType logicalaccess::CardException::error_code ( ) const
inline

Member Data Documentation

◆ error_type_

enum ErrorType logicalaccess::CardException::error_type_
protected

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