Fast DDS  Version 3.3.0
Fast DDS
Loading...
Searching...
No Matches
RpcException.hpp
1// Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
19#ifndef FASTDDS_DDS_RPC_EXCEPTIONS__RPCEXCEPTION_HPP
20#define FASTDDS_DDS_RPC_EXCEPTIONS__RPCEXCEPTION_HPP
21
22#include <stdexcept>
23#include <string>
24
25#include <fastdds/fastdds_dll.hpp>
26
27namespace eprosima {
28namespace fastdds {
29namespace dds {
30namespace rpc {
31
36{
37
38public:
39
45 explicit RpcException(
46 const std::string& message)
47 : logic_error_(message)
48 {
49 }
50
56 explicit RpcException(
57 const char* message)
58 : logic_error_(message)
59 {
60 }
61
66 const RpcException& other) noexcept = default;
67
72 const RpcException& other) noexcept = default;
73
77 virtual ~RpcException() noexcept = default;
78
82 const char* what() const noexcept
83 {
84 return logic_error_.what();
85 }
86
87private:
88
89 std::logic_error logic_error_;
90
91};
92
93} // namespace rpc
94} // namespace dds
95} // namespace fastdds
96} // namespace eprosima
97
98#endif // FASTDDS_DDS_RPC_EXCEPTIONS__RPCEXCEPTION_HPP
Base class for all exceptions thrown by the RPC API.
Definition RpcException.hpp:36
RpcException & operator=(const RpcException &other) noexcept=default
Copy assignment.
RpcException(const char *message)
Constructor.
Definition RpcException.hpp:56
const char * what() const noexcept
Returns the explanatory string.
Definition RpcException.hpp:82
RpcException(const RpcException &other) noexcept=default
Copy constructor.
virtual ~RpcException() noexcept=default
Destructor.
RpcException(const std::string &message)
Constructor.
Definition RpcException.hpp:45
Definition DomainParticipant.hpp:46
eProsima namespace.