Keypop Storage Card C++ API - 1.2.0
Component of the Keypop C++ API
SCAuthenticationFailedException.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2026 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * This program and the accompanying materials are made available under the *
5 * terms of the MIT License which is available at *
6 * https://opensource.org/licenses/MIT *
7 * *
8 * SPDX-License-Identifier: MIT *
9 ******************************************************************************/
10
11#pragma once
12
13#include <memory>
14#include <string>
15
16#include "keypop/reader/CardCommunicationException.hpp"
18
19namespace keypop {
20namespace storagecard {
21
22using keypop::reader::CardCommunicationException;
23
34class SCAuthenticationFailedException final : public CardCommunicationException,
36public:
47 const std::shared_ptr<int>& blockAddress, const std::string& message)
48 : CardCommunicationException(message)
49 , mBlockAddress(blockAddress)
50 {
51 }
52
64 const std::shared_ptr<int>& blockAddress,
65 const std::string& message,
66 const std::exception& cause)
67 : CardCommunicationException(message, cause)
68 , mBlockAddress(blockAddress)
69 {
70 }
71
77 std::shared_ptr<int>
78 getBlockAddress() const override
79 {
80 return mBlockAddress;
81 }
82
83private:
87 const std::shared_ptr<int> mBlockAddress;
88};
89
90} /* namespace storagecard */
91} /* namespace keypop */
Indicates that an authentication attempt on a StorageCard has failed.
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 c...
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 c...
std::shared_ptr< int > getBlockAddress() const override
Returns the address of the block involved in the error, if applicable.The block address that caused t...
Interface for exceptions occurring during the execution of a command on a StorageCard.