Keypop Storage Card C++ API - 1.2.0
Component of the Keypop C++ API
keypop::storagecard::SCAuthenticationFailedException Class Referencefinal

Indicates that an authentication attempt on a StorageCard has failed. More...

#include <keypop/storagecard/SCAuthenticationFailedException.hpp>

Inheritance diagram for keypop::storagecard::SCAuthenticationFailedException:
Collaboration diagram for keypop::storagecard::SCAuthenticationFailedException:

Public Member Functions

 SCAuthenticationFailedException (const std::shared_ptr< int > &blockAddress, const std::string &message)
 Creates a new exception indicating an authentication failure during the execution of a storage card command. More...
 
 SCAuthenticationFailedException (const std::shared_ptr< int > &blockAddress, const std::string &message, const std::exception &cause)
 Creates a new exception indicating an authentication failure during the execution of a storage card command, with an underlying cause. More...
 
std::shared_ptr< int > getBlockAddress () const override
 Returns the address of the block involved in the error, if applicable.
Returns
The block address that caused the error, or nullptr if not relevant.
Since
1.0.0
More...
 
- Public Member Functions inherited from keypop::storagecard::StorageCardException
 StorageCardException ()=default
 
 StorageCardException (const StorageCardException &)=default
 
 StorageCardException (StorageCardException &&)=default
 
StorageCardException & operator= (const StorageCardException &)=default
 
StorageCardException & operator= (StorageCardException &&)=default
 
virtual ~StorageCardException ()=default
 

Detailed Description

Indicates that an authentication attempt on a StorageCard has failed.

This exception is thrown when authentication to a Mifare Classic sector fails, typically due to incorrect key data or key type. Authentication is required before reading from or writing to protected sectors on Mifare Classic cards.

Since
1.1.0

Definition at line 34 of file SCAuthenticationFailedException.hpp.

Constructor & Destructor Documentation

◆ SCAuthenticationFailedException() [1/2]

keypop::storagecard::SCAuthenticationFailedException::SCAuthenticationFailedException ( const std::shared_ptr< int > &  blockAddress,
const std::string &  message 
)
inline

Creates a new exception indicating an authentication failure during the execution of a storage card command.

Parameters
blockAddressThe block address involved in the error, or nullptr if not relevant.
messageThe message describing the exception context.
Since
1.1.0

Definition at line 46 of file SCAuthenticationFailedException.hpp.

◆ SCAuthenticationFailedException() [2/2]

keypop::storagecard::SCAuthenticationFailedException::SCAuthenticationFailedException ( const std::shared_ptr< int > &  blockAddress,
const std::string &  message,
const std::exception &  cause 
)
inline

Creates a new exception indicating an authentication failure during the execution of a storage card command, with an underlying cause.

Parameters
blockAddressThe block address involved in the error, or nullptr if not relevant.
messageThe message describing the exception context.
causeThe underlying cause of the exception.
Since
1.1.0

Definition at line 63 of file SCAuthenticationFailedException.hpp.

Member Function Documentation

◆ getBlockAddress()

std::shared_ptr< int > keypop::storagecard::SCAuthenticationFailedException::getBlockAddress ( ) const
inlineoverridevirtual

Returns the address of the block involved in the error, if applicable.

Returns
The block address that caused the error, or nullptr if not relevant.
Since
1.0.0

Since
1.1.0

Implements keypop::storagecard::StorageCardException.

Definition at line 78 of file SCAuthenticationFailedException.hpp.


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