Keypop Reader C++ API 2.0.0
Reference Reader API for C++
ReaderCommunicationException.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2025 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 <stdexcept>
15#include <string>
16
17namespace keypop {
18namespace reader {
19
28class ReaderCommunicationException final : public std::runtime_error {
29public:
34 explicit ReaderCommunicationException(const std::string& message)
35 : std::runtime_error(message)
36 , mMessage(message)
37 {
38 }
39
46 const std::string& message, const std::shared_ptr<std::exception> cause)
47 : std::runtime_error(message)
48 , mMessage(message)
49 {
50 (void)cause;
51 }
52
56 const std::string&
57 getMessage() const
58 {
59 return mMessage;
60 }
61
62private:
66 const std::string mMessage;
67};
68
69} /* namespace reader */
70} /* namespace keypop */
ReaderCommunicationException(const std::string &message, const std::shared_ptr< std::exception > cause)