eclipse-iceoryx / eclipse-iceoryx/iceoryx

Refactor all posix wrapper with better error handling

Open
#833 2 comments 1 reaction 0 assignees View on GitHub
enhancement globex refactoring technical debt
Dominant language
C++
Stars
2.2k
Forks
492
Avg merge
18h 57m
Merged PRs (30d)
1

Description

## Brief feature description

At the moment the posix wrapper have a very detailed and unnecessary error handling. We should refactor the following aspects of the posix wrapper.
1. Misuse of posix functions through wrong arguments or wrong call order is handled by the abstraction via enum classes or contract by design.
2. a `cxx::expected` should be replaced with `cxx::Ensures` when the failure can only be caused by system corruption. For instance when someone outside of the program removed the shared memory handle with `rm -rf /dev/shm/my_shared_memory`.

The first aspect would reduce the error handling since it is much harder to misuse the posix wrapper through wrong options. The second aspect would reduce it even further and in my opinion it is no longer the task of the application to handle a corrupted system. When this is detected we should only terminate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.