Skip to content

Commit a8288c6

Browse files
committed
Refs #23079. Add rpc exceptions to python bindings.
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
1 parent 5de871b commit a8288c6

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

fastdds_python/src/swig/fastdds.i

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,4 @@ namespace xtypes {
242242
%include "fastdds/dds/domain/DomainParticipantFactory.i"
243243
%include "fastdds/dds/xtypes/type_representation/TypeObject.i"
244244
%include "fastdds/dds/rpc/interfaces.i"
245+
%include "fastdds/dds/rpc/exceptions.i"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
15+
%{
16+
#include "fastdds/dds/rpc/exceptions.hpp"
17+
%}
18+
19+
// Base class should be included first
20+
%include "fastdds/dds/rpc/exceptions/RpcException.hpp"
21+
// Include first level inheritance
22+
%include "fastdds/dds/rpc/exceptions/RpcBrokenPipeException.hpp"
23+
%include "fastdds/dds/rpc/exceptions/RpcFeedCancelledException.hpp"
24+
%include "fastdds/dds/rpc/exceptions/RpcOperationError.hpp"
25+
%include "fastdds/dds/rpc/exceptions/RpcTimeoutException.hpp"
26+
// This is the base class for second level inheritance
27+
%include "fastdds/dds/rpc/RemoteExceptionCode_t.hpp"
28+
%include "fastdds/dds/rpc/exceptions/RpcRemoteException.hpp"
29+
// Include second level inheritance
30+
%include "fastdds/dds/rpc/exceptions/RemoteInvalidArgumentError.hpp"
31+
%include "fastdds/dds/rpc/exceptions/RemoteOutOfResourcesError.hpp"
32+
%include "fastdds/dds/rpc/exceptions/RemoteUnknownExceptionError.hpp"
33+
%include "fastdds/dds/rpc/exceptions/RemoteUnknownOperationError.hpp"
34+
%include "fastdds/dds/rpc/exceptions/RemoteUnsupportedError.hpp"

0 commit comments

Comments
 (0)