-
Notifications
You must be signed in to change notification settings - Fork 28
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 (reopening of PR #301) #304
base: main
Are you sure you want to change the base?
Adding exception type for empty callback functions (reopening of PR #301) #304
Conversation
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not much to say! LGTM. I learned a bit more C++ reading through here.
I saw that a couple of stages of CI fell over. @lukas-he -- would you like to investigate?
I looked into the error and as far as I understand, the linting fails before actually linting, but when trying to install clang-tidy-12 see here. So we could go to a newer clang-tidy version. What do you think @PLeVasseur? |
Co-authored-by: Pete LeVasseur <[email protected]>
Seems like a reasonable solution if the previous version we're using is not available and doesn't in-turn flag a bunch of more things to fix 😅 IIRC the default runner image is now Ubuntu 24.04.1, see here. Likely that version of clang-tidy may not be available. If you find that updating clang-tidy flags a bunch of additional things to fix, one option is to use Ubuntu 22.04 for now. Then address the issues found by the new clang-tidy all in one PR. It's a thought! |
Hello everyone,
As discussed with Greg yesterday, I am reopening a PR for Greg's bugfix contribution with PR #301 .