| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
RpcRemoteException.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
18
19#ifndef FASTDDS_DDS_RPC_EXCEPTIONS__RPCREMOTEEXCEPTION_HPP
20#define FASTDDS_DDS_RPC_EXCEPTIONS__RPCREMOTEEXCEPTION_HPP
21
22#include <fastdds/fastdds_dll.hpp>
23#include <fastdds/dds/rpc/RemoteExceptionCode_t.hpp>
24#include <fastdds/dds/rpc/exceptions/RpcException.hpp>
25
26 namespace eprosima {
27 namespace fastdds {
28 namespace dds {
29 namespace rpc {
30
34 class RpcRemoteException : public RpcException
35{
36
37 public:
38
42 RpcRemoteException(
43 RemoteExceptionCode_t code,
44 const char* msg)
45 : RpcException(msg)
46 , code_(code)
47 {
48 }
49
53 RpcRemoteException(
54 const RpcRemoteException& other) noexcept = default;
55
59 RpcRemoteException& operator =(
60 const RpcRemoteException& other) noexcept = default;
61
65 virtual ~RpcRemoteException() noexcept = default;
66
72 RemoteExceptionCode_t code() const noexcept
73 {
74 return code_;
75 }
76
77 private:
78
80 RemoteExceptionCode_t code_;
81
82};
83
84} // namespace rpc
85} // namespace dds
86} // namespace fastdds
87} // namespace eprosima
88
89#endif // FASTDDS_DDS_RPC_EXCEPTIONS__RPCREMOTEEXCEPTION_HPP
eprosima::fastdds::dds::rpc::RpcException::RpcException
RpcException(const std::string &message)
Constructor.
Definition RpcException.hpp:45
eprosima::fastdds::dds::rpc::RpcRemoteException::~RpcRemoteException
virtual ~RpcRemoteException() noexcept=default
Destructor.
eprosima::fastdds::dds::rpc::RpcRemoteException::operator=
RpcRemoteException & operator=(const RpcRemoteException &other) noexcept=default
Copy assignment.
eprosima::fastdds::dds::rpc::RpcRemoteException::code
RemoteExceptionCode_t code() const noexcept
Get the exception code.
Definition RpcRemoteException.hpp:72
eprosima::fastdds::dds::rpc::RpcRemoteException::RpcRemoteException
RpcRemoteException(const RpcRemoteException &other) noexcept=default
Copy constructor.
eprosima::fastdds::dds::rpc::RpcRemoteException::RpcRemoteException
RpcRemoteException(RemoteExceptionCode_t code, const char *msg)
Constructor.
Definition RpcRemoteException.hpp:42
eprosima::fastdds::dds::rpc
Definition DomainParticipant.hpp:59
eprosima::fastdds::dds::rpc::RemoteExceptionCode_t
RemoteExceptionCode_t
Enumeration of possible error codes that can be returned by a remote service.
Definition RemoteExceptionCode_t.hpp:30
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds
eprosima
eProsima namespace.