Skip to content

Commit

Permalink
iox-eclipse-iceoryx#91 Add error handling in PortManager
Browse files Browse the repository at this point in the history
Signed-off-by: Hoinkis Simon (CC-AD/ESW1) <simon.hoinkis2@de.bosch.com>
  • Loading branch information
mossmaurice committed Aug 24, 2020
1 parent 53aacd3 commit 95a6c05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions iceoryx_posh/source/roudi/port_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,16 @@ PortManager::PortManager(RouDiMemoryInterface* roudiMemoryInterface)
auto maybePortPool = m_roudiMemoryInterface->portPool();
if (!maybePortPool.has_value())
{
/// @todo errorHandler
LogFatal() << "Could not get PortPool!";
std::terminate();
errorHandler(Error::kPORT_MANAGER__PORT_POOL_UNAVAILABLE, nullptr, iox::ErrorLevel::SEVERE);
}
m_portPool = maybePortPool.value();

auto maybeIntrospectionMemoryManager = m_roudiMemoryInterface->introspectionMemoryManager();
if (!maybeIntrospectionMemoryManager.has_value())
{
/// @todo errorHandler
LogFatal() << "Could not get MemoryManager for introspection!";
std::terminate();
errorHandler(Error::kPORT_MANAGER__INTROSPECTION_MEMORY_MANAGER_UNAVAILABLE, nullptr, iox::ErrorLevel::SEVERE);
}
auto& introspectionMemoryManager = maybeIntrospectionMemoryManager.value();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ namespace iox
error(PORT_POOL__APPLICATIONLIST_OVERFLOW) \
error(PORT_POOL__RUNNABLELIST_OVERFLOW) \
error(PORT_POOL__CONDITION_VARIABLE_LIST_OVERFLOW) \
error(PORT_MANAGER__PORT_POOL_UNAVAILABLE) \
error(PORT_MANAGER__INTROSPECTION_MEMORY_MANAGER_UNAVAILABLE) \
error(MQ_UNKNOWN_MSG) \
error(MQ_INVALID_MSG) \
error(MQ_INTERFACE__REG_ROUDI_NOT_AVAILABLE) \
Expand Down

0 comments on commit 95a6c05

Please sign in to comment.