Keypop Storage Card C++ API - 1.2.0
Component of the Keypop C++ API
SCCardCommunicationException.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
39class SCCardCommunicationException final : public CardCommunicationException,
41public:
52 const std::shared_ptr<int>& blockAddress, const std::string& message)
53 : CardCommunicationException(message)
54 , mBlockAddress(blockAddress)
55 {
56 }
57
69 const std::shared_ptr<int>& blockAddress,
70 const std::string& message,
71 const std::exception& cause)
72 : CardCommunicationException(message, cause)
73 , mBlockAddress(blockAddress)
74 {
75 }
76
82 std::shared_ptr<int>
83 getBlockAddress() const override
84 {
85 return mBlockAddress;
86 }
87
88private:
92 const std::shared_ptr<int> mBlockAddress;
93};
94
95} /* namespace storagecard */
96} /* namespace keypop */
Indicates an input/output error that occurred while communicating with the StorageCard.
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...
SCCardCommunicationException(const std::shared_ptr< int > &blockAddress, const std::string &message)
Creates a new exception indicating a card communication error during the execution of a storage card ...
SCCardCommunicationException(const std::shared_ptr< int > &blockAddress, const std::string &message, const std::exception &cause)
Creates a new exception indicating a card communication error during the execution of a storage card ...
Interface for exceptions occurring during the execution of a command on a StorageCard.