Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CalypsoApduCommandException.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2022 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional information regarding *
5 * copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the terms of the Eclipse *
8 * Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0 *
9 * *
10 * SPDX-License-Identifier: EPL-2.0 *
11 **************************************************************************************************/
12
13#pragma once
14
15/* Keyple Core Utils */
16#include "Exception.h"
17
18/* Keyple Card Calypso */
19#include "CardCommand.h"
20
21namespace keyple {
22namespace card {
23namespace calypso {
24
25using namespace keyple::core::util::cpp::exception;
26
32class CalypsoApduCommandException : public Exception {
33public:
40 const CardCommand& getCommand() const
41 {
42 return mCommand;
43 }
44
51 const std::shared_ptr<int> getStatusWord() const
52 {
53 return mStatusWord;
54 }
55
56protected:
65 CalypsoApduCommandException(const std::string& message,
66 const CardCommand& command,
67 const std::shared_ptr<int> statusWord)
68 : Exception(message), mCommand(command), mStatusWord(statusWord) {}
69
70private:
74 const CardCommand& mCommand;
75
79 const std::shared_ptr<int> mStatusWord;
80};
81
82}
83}
84}
CalypsoApduCommandException(const std::string &message, const CardCommand &command, const std::shared_ptr< int > statusWord)