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

Semantics of messages in 'expect' #2036

Open
elBoberido opened this issue Sep 25, 2023 · 0 comments
Open

Semantics of messages in 'expect' #2036

elBoberido opened this issue Sep 25, 2023 · 0 comments
Labels
good first issue Good for newcomers refactoring Refactor code without adding features

Comments

@elBoberido
Copy link
Member

In my last PR is described the actual expected result in the expect call of the expected and optional, e.g. This is okay since Foo is guaranteed but I was made aware that in iceoryx it was mainly used to describe the unexpected outcome, e.g. Failed because Foo invariant is broken. From my experience with Rust I'm more used to the former semantics, i.e. describe what is expected to happen. This can also be used instead of comments and as justification why expect is called instead of doing some error handling.

What do you think about changing the semantics of the expect message to describe why it is safe to call expect and also adjust the log output to something like

[FATAL] Expected 'This is okay since Foo is guaranteed' but failed

I would volunteer to change the current strings in iceoryx.

Originally posted by @elBoberido in #2029

@elBoberido elBoberido added good first issue Good for newcomers refactoring Refactor code without adding features labels Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactoring Refactor code without adding features
Projects
None yet
Development

No branches or pull requests

1 participant