Skip to content

Commit

Permalink
[eclipse-iceoryx#491] Test all error enum to string conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
orecham committed Nov 15, 2024
1 parent 1e9f564 commit 89476f1
Show file tree
Hide file tree
Showing 7 changed files with 328 additions and 1 deletion.
27 changes: 27 additions & 0 deletions iceoryx2-ffi/cxx/include/iox2/enum_translation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ constexpr auto from<int, iox2::EventOpenOrCreateError>(const int value) noexcept
return iox2::EventOpenOrCreateError::CreateHangsInCreation;
case iox2_event_open_or_create_error_e_C_INSUFFICIENT_PERMISSIONS:
return iox2::EventOpenOrCreateError::CreateInsufficientPermissions;
case iox2_event_open_or_create_error_e_C_OLD_CONNECTION_STILL_ACTIVE:
return iox2::EventOpenOrCreateError::CreateOldConnectionsStillActive;
}

IOX_UNREACHABLE();
Expand Down Expand Up @@ -347,6 +349,8 @@ constexpr auto from<iox2::EventOpenOrCreateError, iox2_event_open_or_create_erro
return iox2_event_open_or_create_error_e_C_HANGS_IN_CREATION;
case iox2::EventOpenOrCreateError::CreateInsufficientPermissions:
return iox2_event_open_or_create_error_e_C_INSUFFICIENT_PERMISSIONS;
case iox2::EventOpenOrCreateError::CreateOldConnectionsStillActive:
return iox2_event_open_or_create_error_e_C_OLD_CONNECTION_STILL_ACTIVE;
default:
IOX_UNREACHABLE();
}
Expand Down Expand Up @@ -459,6 +463,8 @@ constexpr auto from<iox2::EventCreateError, iox2_event_open_or_create_error_e>(
return iox2_event_open_or_create_error_e_C_INTERNAL_FAILURE;
case iox2::EventCreateError::ServiceInCorruptedState:
return iox2_event_open_or_create_error_e_C_SERVICE_IN_CORRUPTED_STATE;
case iox2::EventCreateError::OldConnectionsStillActive:
return iox2_event_open_or_create_error_e_C_OLD_CONNECTION_STILL_ACTIVE;
default:
IOX_UNREACHABLE();
}
Expand Down Expand Up @@ -518,6 +524,8 @@ constexpr auto from<int, iox2::PublishSubscribeOpenOrCreateError>(const int valu
return iox2::PublishSubscribeOpenOrCreateError::CreateIsBeingCreatedByAnotherInstance;
case iox2_pub_sub_open_or_create_error_e_C_HANGS_IN_CREATION:
return iox2::PublishSubscribeOpenOrCreateError::CreateHangsInCreation;
case iox2_pub_sub_open_or_create_error_e_C_OLD_CONNECTION_STILL_ACTIVE:
return iox2::PublishSubscribeOpenOrCreateError::CreateOldConnectionsStillActive;
}

IOX_UNREACHABLE();
Expand Down Expand Up @@ -708,6 +716,8 @@ constexpr auto from<iox2::PublishSubscribeOpenOrCreateError, iox2_pub_sub_open_o
return iox2_pub_sub_open_or_create_error_e_C_IS_BEING_CREATED_BY_ANOTHER_INSTANCE;
case iox2::PublishSubscribeOpenOrCreateError::CreateHangsInCreation:
return iox2_pub_sub_open_or_create_error_e_C_HANGS_IN_CREATION;
case iox2::PublishSubscribeOpenOrCreateError::CreateOldConnectionsStillActive:
return iox2_pub_sub_open_or_create_error_e_C_OLD_CONNECTION_STILL_ACTIVE;
default:
IOX_UNREACHABLE();
}
Expand Down Expand Up @@ -1190,6 +1200,23 @@ constexpr auto from<int, iox2::WaitSetRunResult>(const int value) noexcept -> io
IOX_UNREACHABLE();
}

template <>
constexpr auto from<iox2::WaitSetRunResult, iox2_waitset_run_result_e>(const iox2::WaitSetRunResult value) noexcept
-> iox2_waitset_run_result_e {
switch (value) {
case iox2::WaitSetRunResult::Interrupt:
return iox2_waitset_run_result_e_INTERRUPT;
case iox2::WaitSetRunResult::TerminationRequest:
return iox2_waitset_run_result_e_TERMINATION_REQUEST;
case iox2::WaitSetRunResult::StopRequest:
return iox2_waitset_run_result_e_STOP_REQUEST;
case iox2::WaitSetRunResult::AllEventsHandled:
return iox2_waitset_run_result_e_ALL_EVENTS_HANDLED;
}

IOX_UNREACHABLE();
}

template <>
constexpr auto from<int, iox2::WaitSetAttachmentError>(const int value) noexcept -> iox2::WaitSetAttachmentError {
const auto variant = static_cast<iox2_waitset_attachment_error_e>(value);
Expand Down
1 change: 1 addition & 0 deletions iceoryx2-ffi/cxx/include/iox2/waitset_enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ enum class WaitSetRunError : uint8_t {
};

auto error_string(const iox2::WaitSetCreateError& error) -> const char*;
auto error_string(const iox2::WaitSetRunResult& error) -> const char*;
auto error_string(const iox2::WaitSetAttachmentError& error) -> const char*;
auto error_string(const iox2::WaitSetRunError& error) -> const char*;

Expand Down
4 changes: 4 additions & 0 deletions iceoryx2-ffi/cxx/src/error_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,8 @@ auto error_string(const iox2::WaitSetRunError& error) -> const char* {
return iox2_waitset_run_error_string(iox::into<iox2_waitset_run_error_e>(error));
}

auto error_string(const iox2::WaitSetRunResult& error) -> const char* {
return iox2_waitset_run_result_string(iox::into<iox2_waitset_run_result_e>(error));
}

} // namespace iox2
284 changes: 284 additions & 0 deletions iceoryx2-ffi/cxx/tests/src/error_string_tests.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
// Copyright (c) 2024 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// This program and the accompanying materials are made available under the
// terms of the Apache Software License 2.0 which is available at
// https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
// which is available at https://opensource.org/licenses/MIT.
//
// SPDX-License-Identifier: Apache-2.0 OR MIT

#include "test.hpp"

#include "iox2/config_creation_error.hpp"
#include "iox2/connection_failure.hpp"
#include "iox2/listener_error.hpp"
#include "iox2/node_failure_enums.hpp"
#include "iox2/node_wait_failure.hpp"
#include "iox2/notifier_error.hpp"
#include "iox2/publisher_error.hpp"
#include "iox2/service_builder_event_error.hpp"
#include "iox2/service_builder_publish_subscribe_error.hpp"
#include "iox2/service_error_enums.hpp"
#include "iox2/subscriber_error.hpp"
#include "iox2/waitset_enums.hpp"

namespace {

using iox2::error_string;

TEST(ErrorStringTest, config_creation_error_string) {
using Sut = iox2::ConfigCreationError;
ASSERT_GT(strlen(error_string(Sut::FailedToOpenConfigFile)), 0U);
ASSERT_GT(strlen(error_string(Sut::UnableToDeserializeContents)), 0U);
ASSERT_GT(strlen(error_string(Sut::FailedToReadConfigFileContents)), 0U);
}

TEST(ErrorStringTest, connection_failure_string) {
using Sut = iox2::ConnectionFailure;
ASSERT_GT(strlen(error_string(Sut::FailedToEstablishConnection)), 0U);
ASSERT_GT(strlen(error_string(Sut::UnableToMapPublishersDataSegment)), 0U);
}

TEST(ErrorStringTest, listener_create_error_string) {
using Sut = iox2::ListenerCreateError;
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxSupportedListeners)), 0U);
ASSERT_GT(strlen(error_string(Sut::ResourceCreationFailed)), 0U);
}

TEST(ErrorStringTest, listener_wait_error_string) {
using Sut = iox2::ListenerWaitError;
ASSERT_GT(strlen(error_string(Sut::ContractViolation)), 0U);
ASSERT_GT(strlen(error_string(Sut::InterruptSignal)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalFailure)), 0U);
}

TEST(ErrorStringTest, node_list_failure_string) {
using Sut = iox2::NodeListFailure;
ASSERT_GT(strlen(error_string(Sut::InsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalError)), 0U);
ASSERT_GT(strlen(error_string(Sut::Interrupt)), 0U);
}

TEST(ErrorStringTest, node_creation_failure_string) {
using Sut = iox2::NodeCreationFailure;
ASSERT_GT(strlen(error_string(Sut::InsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalError)), 0U);
}

TEST(ErrorStringTest, node_wait_failure_string) {
using Sut = iox2::NodeWaitFailure;
ASSERT_GT(strlen(error_string(Sut::TerminationRequest)), 0U);
ASSERT_GT(strlen(error_string(Sut::Interrupt)), 0U);
}

TEST(ErrorStringTest, notifier_create_error_string) {
using Sut = iox2::NotifierCreateError;
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxSupportedNotifiers)), 0U);
}

TEST(ErrorStringTest, notifier_notify_error_string) {
using Sut = iox2::NotifierNotifyError;
ASSERT_GT(strlen(error_string(Sut::EventIdOutOfBounds)), 0U);
}

TEST(ErrorStringTest, publisher_create_error_string) {
using Sut = iox2::PublisherCreateError;
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxSupportedPublishers)), 0U);
ASSERT_GT(strlen(error_string(Sut::UnableToCreateDataSegment)), 0U);
}

TEST(ErrorStringTest, publisher_loan_error_string) {
using Sut = iox2::PublisherLoanError;
ASSERT_GT(strlen(error_string(Sut::OutOfMemory)), 0U);
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxLoanedSamples)), 0U);
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxLoanSize)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalFailure)), 0U);
}

TEST(ErrorStringTest, publisher_send_error_string) {
using Sut = iox2::PublisherSendError;
ASSERT_GT(strlen(error_string(Sut::ConnectionBrokenSincePublisherNoLongerExists)), 0U);
ASSERT_GT(strlen(error_string(Sut::ConnectionCorrupted)), 0U);
ASSERT_GT(strlen(error_string(Sut::LoanErrorOutOfMemory)), 0U);
ASSERT_GT(strlen(error_string(Sut::LoanErrorExceedsMaxLoanedSamples)), 0U);
ASSERT_GT(strlen(error_string(Sut::LoanErrorExceedsMaxLoanSize)), 0U);
ASSERT_GT(strlen(error_string(Sut::LoanErrorInternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::ConnectionError)), 0U);
}

TEST(ErrorStringTest, event_open_error_string) {
using Sut = iox2::EventOpenError;
ASSERT_GT(strlen(error_string(Sut::DoesNotExist)), 0U);
ASSERT_GT(strlen(error_string(Sut::InsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::ServiceInCorruptedState)), 0U);
ASSERT_GT(strlen(error_string(Sut::IncompatibleMessagingPattern)), 0U);
ASSERT_GT(strlen(error_string(Sut::IncompatibleAttributes)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::HangsInCreation)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedAmountOfNotifiers)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedAmountOfListeners)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedMaxEventId)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedAmountOfNodes)), 0U);
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxNumberOfNodes)), 0U);
ASSERT_GT(strlen(error_string(Sut::IsMarkedForDestruction)), 0U);
}

TEST(ErrorStringTest, event_create_error_string) {
using Sut = iox2::EventCreateError;
ASSERT_GT(strlen(error_string(Sut::ServiceInCorruptedState)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::IsBeingCreatedByAnotherInstance)), 0U);
ASSERT_GT(strlen(error_string(Sut::AlreadyExists)), 0U);
ASSERT_GT(strlen(error_string(Sut::HangsInCreation)), 0U);
ASSERT_GT(strlen(error_string(Sut::InsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::OldConnectionsStillActive)), 0U);
}

TEST(ErrorStringTest, event_open_or_create_error_string) {
using Sut = iox2::EventOpenOrCreateError;
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotExist)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenInsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenServiceInCorruptedState)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenIncompatibleMessagingPattern)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenIncompatibleAttributes)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenInternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenHangsInCreation)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedAmountOfNotifiers)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedAmountOfListeners)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedMaxEventId)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedAmountOfNodes)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenExceedsMaxNumberOfNodes)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenIsMarkedForDestruction)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateServiceInCorruptedState)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateInternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateIsBeingCreatedByAnotherInstance)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateAlreadyExists)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateHangsInCreation)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateInsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateOldConnectionsStillActive)), 0U);
}

TEST(ErrorStringTest, publish_subscribe_open_error_string) {
using Sut = iox2::PublishSubscribeOpenError;
ASSERT_GT(strlen(error_string(Sut::DoesNotExist)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::IncompatibleTypes)), 0U);
ASSERT_GT(strlen(error_string(Sut::IncompatibleMessagingPattern)), 0U);
ASSERT_GT(strlen(error_string(Sut::IncompatibleAttributes)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedMinBufferSize)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedMinHistorySize)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedMinSubscriberBorrowedSamples)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedAmountOfPublishers)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedAmountOfSubscribers)), 0U);
ASSERT_GT(strlen(error_string(Sut::DoesNotSupportRequestedAmountOfNodes)), 0U);
ASSERT_GT(strlen(error_string(Sut::IncompatibleOverflowBehavior)), 0U);
ASSERT_GT(strlen(error_string(Sut::InsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::ServiceInCorruptedState)), 0U);
ASSERT_GT(strlen(error_string(Sut::HangsInCreation)), 0U);
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxNumberOfNodes)), 0U);
ASSERT_GT(strlen(error_string(Sut::IsMarkedForDestruction)), 0U);
}

TEST(ErrorStringTest, publish_subscribe_create_error_string) {
using Sut = iox2::PublishSubscribeCreateError;
ASSERT_GT(strlen(error_string(Sut::ServiceInCorruptedState)), 0U);
ASSERT_GT(strlen(error_string(Sut::SubscriberBufferMustBeLargerThanHistorySize)), 0U);
ASSERT_GT(strlen(error_string(Sut::AlreadyExists)), 0U);
ASSERT_GT(strlen(error_string(Sut::InsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::IsBeingCreatedByAnotherInstance)), 0U);
ASSERT_GT(strlen(error_string(Sut::HangsInCreation)), 0U);
}

TEST(ErrorStringTest, publish_subscribe_open_or_create_error_string) {
using Sut = iox2::PublishSubscribeOpenOrCreateError;
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotExist)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenInternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenIncompatibleTypes)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenIncompatibleMessagingPattern)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenIncompatibleAttributes)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedMinBufferSize)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedMinHistorySize)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedMinSubscriberBorrowedSamples)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedAmountOfPublishers)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedAmountOfSubscribers)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenDoesNotSupportRequestedAmountOfNodes)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenIncompatibleOverflowBehavior)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenInsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenServiceInCorruptedState)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenHangsInCreation)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenExceedsMaxNumberOfNodes)), 0U);
ASSERT_GT(strlen(error_string(Sut::OpenIsMarkedForDestruction)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateServiceInCorruptedState)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateSubscriberBufferMustBeLargerThanHistorySize)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateAlreadyExists)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateInsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateInternalFailure)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateIsBeingCreatedByAnotherInstance)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateOldConnectionsStillActive)), 0U);
ASSERT_GT(strlen(error_string(Sut::CreateHangsInCreation)), 0U);
}

TEST(ErrorStringTest, service_details_error_string) {
using Sut = iox2::ServiceDetailsError;
ASSERT_GT(strlen(error_string(Sut::FailedToOpenStaticServiceInfo)), 0U);
ASSERT_GT(strlen(error_string(Sut::FailedToReadStaticServiceInfo)), 0U);
ASSERT_GT(strlen(error_string(Sut::FailedToDeserializeStaticServiceInfo)), 0U);
ASSERT_GT(strlen(error_string(Sut::ServiceInInconsistentState)), 0U);
ASSERT_GT(strlen(error_string(Sut::VersionMismatch)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalError)), 0U);
ASSERT_GT(strlen(error_string(Sut::FailedToAcquireNodeState)), 0U);
}

TEST(ErrorStringTest, service_list_error_string) {
using Sut = iox2::ServiceListError;
ASSERT_GT(strlen(error_string(Sut::InsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalError)), 0U);
}

TEST(ErrorStringTest, subscriber_receive_error_string) {
using Sut = iox2::SubscriberReceiveError;
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxBorrowedSamples)), 0U);
ASSERT_GT(strlen(error_string(Sut::FailedToEstablishConnection)), 0U);
ASSERT_GT(strlen(error_string(Sut::UnableToMapPublishersDataSegment)), 0U);
}

TEST(ErrorStringTest, subscriber_create_error_string) {
using Sut = iox2::SubscriberCreateError;
ASSERT_GT(strlen(error_string(Sut::ExceedsMaxSupportedSubscribers)), 0U);
ASSERT_GT(strlen(error_string(Sut::BufferSizeExceedsMaxSupportedBufferSizeOfService)), 0U);
}

TEST(ErrorStringTest, waitset_create_error_string) {
using Sut = iox2::WaitSetCreateError;
ASSERT_GT(strlen(error_string(Sut::InternalError)), 0U);
}

TEST(ErrorStringTest, waitset_run_result_string) {
using Sut = iox2::WaitSetRunResult;
ASSERT_GT(strlen(error_string(Sut::TerminationRequest)), 0U);
ASSERT_GT(strlen(error_string(Sut::Interrupt)), 0U);
ASSERT_GT(strlen(error_string(Sut::StopRequest)), 0U);
ASSERT_GT(strlen(error_string(Sut::AllEventsHandled)), 0U);
}

TEST(ErrorStringTest, waitset_attachment_error_string) {
using Sut = iox2::WaitSetAttachmentError;
ASSERT_GT(strlen(error_string(Sut::InsufficientCapacity)), 0U);
ASSERT_GT(strlen(error_string(Sut::AlreadyAttached)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalError)), 0U);
}

TEST(ErrorStringTest, waitset_run_error_string) {
using Sut = iox2::WaitSetRunError;
ASSERT_GT(strlen(error_string(Sut::InsufficientPermissions)), 0U);
ASSERT_GT(strlen(error_string(Sut::InternalError)), 0U);
ASSERT_GT(strlen(error_string(Sut::NoAttachments)), 0U);
ASSERT_GT(strlen(error_string(Sut::TerminationRequest)), 0U);
ASSERT_GT(strlen(error_string(Sut::Interrupt)), 0U);
}

} // namespace
2 changes: 2 additions & 0 deletions iceoryx2-ffi/ffi/src/api/service_builder_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ pub enum iox2_event_open_or_create_error_e {
C_HANGS_IN_CREATION,
#[StringLiteralValue = "insufficient permissions"]
C_INSUFFICIENT_PERMISSIONS,
#[StringLiteralValue = "old connection still active"]
C_OLD_CONNECTION_STILL_ACTIVE,
}

impl IntoCInt for EventOpenError {
Expand Down
2 changes: 2 additions & 0 deletions iceoryx2-ffi/ffi/src/api/service_builder_pub_sub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ pub enum iox2_pub_sub_open_or_create_error_e {
C_INTERNAL_FAILURE,
#[StringLiteralValue = "is being created by another instance"]
C_IS_BEING_CREATED_BY_ANOTHER_INSTANCE,
#[StringLiteralValue = "old connection still active"]
C_OLD_CONNECTION_STILL_ACTIVE,
#[StringLiteralValue = "hangs in creation"]
C_HANGS_IN_CREATION,
}
Expand Down
Loading

0 comments on commit 89476f1

Please sign in to comment.