Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iox-#590 Separate errors of posh and C binding #1028

Closed

Conversation

mossmaurice
Copy link
Contributor

@mossmaurice mossmaurice commented Jan 19, 2022

Pre-Review Checklist for the PR Author

  1. Code follows the coding style of CONTRIBUTING.md
  2. Tests follow the best practice for testing
  3. Changelog updated in the unreleased section including API breaking changes
  4. Branch follows the naming format (iox-#123-this-is-a-branch)
  5. Commits messages are according to this guideline
    • Commit messages have the issue ID (iox-#123 commit text)
    • Commit messages are signed (git commit -s)
    • Commit author matches Eclipse Contributor Agreement (and ECA is signed)
  6. Update the PR title
    • Follow the same conventions as for commit messages
    • Link to the relevant issue
  7. Relevant issues are linked
  8. Add sensible notes for the reviewer
  9. All checks have passed (except task-list-completed)
  10. Assign PR to reviewer

Notes for Reviewer

Before looking at this PR, please have a look at #1027

  • Move errors from hoofs to specific module (posh/ C binding) to make hoofs independent from posh and C binding

Todo

  • Swap arguments in errorHandler() call so that callable is last to avoid nullptr arg

Discussion

  • Switch to a builder pattern as next step?
  • How to make the enum values unique?
    • Use an additional component identifier in the errorHandler() call?
  • Remove the k in front of the errors?

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Code according to our coding style and naming conventions
  • Unit tests have been written for new behavior
    • Each unit test case has a unique UUID
  • Public API changes are documented via doxygen
  • Copyright owner are updated in the changed files
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

…er() calls from hoofs

Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
… errorHandler() call

Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
@mossmaurice mossmaurice added the refactoring Refactor code without adding features label Jan 19, 2022
@mossmaurice mossmaurice self-assigned this Jan 19, 2022
Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>

enum class CBindingError : uint32_t
{
kNO_ERROR = 2000,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one solution to the question "How to make the enum values unique all over iceoryx?" As modules aka CMake packages are seldomly created, I think this approach is ok as an intermediate step till we further work on the error handling (like DLT support). Another possibility would be to add an additional argument to the call with a component id.

Copy link
Contributor

@elfenpiff elfenpiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please keep this PR on hold until we figured out how the overall error concept in iceoryx looks like.
To call terminate is most likely not an option for ASIL D and we may have to make this either configurable or that some user can define custom callbacks to notify maybe some kind of watchdog or even throw an exception.

In those cases an error handler may is the more viable solution.

Copy link
Contributor

@elfenpiff elfenpiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You checked the PR title check but the title does not follow our guidelines. Please add iox-#???.

@mossmaurice mossmaurice changed the title Separate errors of posh and C binding iox-#590 Separate errors of posh and C binding Jan 24, 2022
Copy link
Contributor

@elfenpiff elfenpiff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please perform the renaming of error_handling.hpp into error_handler.hpp in a separate PR.

@mossmaurice mossmaurice mentioned this pull request Feb 10, 2022
21 tasks
@mossmaurice
Copy link
Contributor Author

This PR will be rebased onto #1100. Please refrain from reviewing it. I'll leave it open until there is a replacement to link to.

@mossmaurice
Copy link
Contributor Author

Superseded by #1170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor code without adding features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve modularity by creating architecure guidelines
2 participants