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

Call event handler's error/3 callback function when handle/2 function returns an invalid value #372

Merged
merged 2 commits into from
May 4, 2020

Conversation

slashdotdash
Copy link
Member

The valid return values for an event handler's handle/2 callback function are :ok or {:error, term}. Returning any other value previously caused the handler to crash with a CaseClauseError. This is now caught and will call the handler's error/3 callback function allowing the handler to decide what to do.

Closes #371.

@slashdotdash slashdotdash merged commit dd96627 into master May 4, 2020
@slashdotdash slashdotdash deleted the feature/event-handler-nil branch May 4, 2020 21:27
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.

Call error callback function when an event handler handle/2 returns an invalid value
1 participant