-
Notifications
You must be signed in to change notification settings - Fork 139
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
Callbacks don't run if they don't have the right arity #127
Comments
Are you able to look at this issue before we look at #129 |
Sure thing. So what do you think would be a good solution? Here are some thoughts:
|
I think that the second approach might actually be favorable. Unless of course there is a reliable/easy way to do the arity check up front, during the registration process. If we dump something into the |
We need to let things blow up, as early as possible by letting the exceptions bubble through. I guess the question is, are callbacks 'best effort' or 'job fails if callback fails'? |
My concern here was allowing callbacks to blow up within the internals of
|
Best attempts to log the failure is a good place to start. |
Excellent. Glad we're in agreement. |
👍 |
If the arity of the callback is not right, then an ArgumentError: wrong number of arguments gets thrown, but
instance_exec
swallows all exceptions so basically the effect is that the callback doesn't get run.The text was updated successfully, but these errors were encountered: