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

Find an alternative to the usage of asserts #57

Open
Nicogene opened this issue Feb 1, 2021 · 0 comments
Open

Find an alternative to the usage of asserts #57

Nicogene opened this issue Feb 1, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Nicogene
Copy link
Member

Nicogene commented Feb 1, 2021

We use assert to check the sanity of data inserted in the buffer:

https://github.com/robotology-playground/yarp-telemetry/blob/306c9a047655fc65bf8072006193291bde767346/src/libYARP_telemetry/src/yarp/telemetry/BufferManager.h#L75-L85

or to check if the BufferManager is constructed correctly:
https://github.com/robotology-playground/yarp-telemetry/blob/306c9a047655fc65bf8072006193291bde767346/src/libYARP_telemetry/src/yarp/telemetry/BufferManager.h#L39-L43

The problem is that in Release the assert is trimmed out and can raise issues or bugs like this.

We have to find out an alternative, that maybe can be exceptions also if I am not a big fan of c++ exceptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant