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

Implement default handler if nothing matches #185

Open
hifi opened this issue May 2, 2021 · 1 comment
Open

Implement default handler if nothing matches #185

hifi opened this issue May 2, 2021 · 1 comment

Comments

@hifi
Copy link

hifi commented May 2, 2021

There's an undocumented(?) event handler named all_events but I'd also like to have a catch-all for unhandled events called unhandled_event or something so handlers can be registered at reactor level directly where they exist and others fall through to a catch-all.

I'm now at a point I either need to refactor my project completely to use a custom event handler based on all_events or get an upstream solution as there's too many non-standard reply codes to catch all of them manually.

Would this be doable?

Thanks.

@jaraco
Copy link
Owner

jaraco commented May 25, 2021

That sounds doable. Feel free to explore the event handler space and see if you can propose a viable solution. The simpler, the better.

hifi added a commit to hifi/irc that referenced this issue Jun 10, 2021
Ignoring pong as it is actually handled but the event is still
passed along.

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

Successfully merging a pull request may close this issue.

2 participants