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

change the way fail works #53

Open
cooper opened this issue Mar 6, 2017 · 4 comments
Open

change the way fail works #53

cooper opened this issue Mar 6, 2017 · 4 comments

Comments

@cooper
Copy link
Owner

cooper commented Mar 6, 2017

I'm thinking fail should not stop event propagation. The reason I made it do that is if subsequent callbacks depend on the one that failed, bad things might happen. But now I thought of something else that might be better. If a callback fails, cancel all subsequent callbacks which refer to the one that failed in an after priority hint.

@cooper
Copy link
Owner Author

cooper commented Mar 6, 2017

This would eliminate ->error_continue. I would also have to make it so events yield an error only if the number of failures is equal to the number of functions called. This would also work if both are zero.

@cooper
Copy link
Owner Author

cooper commented Mar 7, 2017

Currently an after hint does not stop the callback from executing if the referenced one is not executed. This would change that. There needs to then be a way to say "after X if applicable, but anytime otherwise" ... maybe after? 🤣

@cooper
Copy link
Owner Author

cooper commented Mar 7, 2017

Also we can't just "cancel" the dependent callbacks. They would have to fail too. That way the overall event fails if the default callback fails and all other callbacks were dependent on it.

@cooper
Copy link
Owner Author

cooper commented Mar 7, 2017

Also on X should probably implicitly mean on X after :default

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

No branches or pull requests

1 participant