Keypop Storage Card C++ API - 1.2.0
Component of the Keypop C++ API
SCInvalidCardResponseException.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/selection/InvalidCardResponseException.hpp"
18
19namespace keypop {
20namespace storagecard {
21
22using keypop::reader::selection::InvalidCardResponseException;
23
36: public InvalidCardResponseException,
38public:
49 const std::shared_ptr<int>& blockAddress, const std::string& message)
50 : InvalidCardResponseException(message)
51 , mBlockAddress(blockAddress)
52 {
53 }
54
66 const std::shared_ptr<int>& blockAddress,
67 const std::string& message,
68 const std::exception& cause)
69 : InvalidCardResponseException(message, cause)
70 , mBlockAddress(blockAddress)
71 {
72 }
73
79 std::shared_ptr<int>
80 getBlockAddress() const override
81 {
82 return mBlockAddress;
83 }
84
85private:
89 const std::shared_ptr<int> mBlockAddress;
90};
91
92} /* namespace storagecard */
93} /* namespace keypop */
Indicates that a command returned an unexpected or invalid status while interacting with the StorageC...
SCInvalidCardResponseException(const std::shared_ptr< int > &blockAddress, const std::string &message)
Creates a new exception indicating a card status code error during the execution of a storage card co...
SCInvalidCardResponseException(const std::shared_ptr< int > &blockAddress, const std::string &message, const std::exception &cause)
Creates a new exception indicating a card status code error during the execution of a storage card co...
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.