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

Adding exception type for empty callback functions #301

Open
wants to merge 4 commits into
base: v1.0_up-v1.6.0
Choose a base branch
from

Conversation

gregmedd
Copy link
Contributor

This exception will be thrown when an empty std::function is passed to the callback connection module. Adding the type first so that tests can be written.

closes #194

This exception will be thrown when an empty std::function is passed to
the callback connection module. Adding the type first so that tests can
be written.
@gregmedd gregmedd self-assigned this Aug 17, 2024
Copy link

Code coverage report is ready! 📈

Copy link

Code coverage report is ready! 📈

Some L2 tests were asserting that the std::bad_function_call exception
should be thrown when a bad callback is called. We will be changing that
behavior so that the exception is thrown when the callback connection is
established, requiring updated test cases.
The CalleeHandle class is the "owner" of the callback function objects
associated with a callback connection. As such, it will check the
validity of those function objects and throw the EmptyFunctionObject
exception if either the callback or cleanup function is empty / invalid.
Copy link

Code coverage report is ready! 📈

Copy link

Code coverage report is ready! 📈

@gregmedd gregmedd marked this pull request as ready for review August 17, 2024 03:17
Copy link
Member

@agosh01 agosh01 left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The callback connection module should check std::function parameters from outside for validity
2 participants