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

Process manager and event handler error & exception handling #192

Merged
merged 2 commits into from Aug 26, 2018

Conversation

@slashdotdash
Copy link
Member

@slashdotdash slashdotdash commented Aug 26, 2018

Allow exceptions and errors during event handling to be handled by error/3 callback functions defined in event handlers and process managers.

This allows extra resiliency for event handling since exceptions will cause process crashes. These processes are usually supervised and get restarted by the supervisor, they will then retry the same event and likely crash again. This can cause the supervisor itself to crash and propagate further up the supervision tree, eventually causing the application to stop.

The pull request allows the user to decide how to handle problematic events by for example retyring a limited number of times or skipping the event.

Call `error/3` callback when a process manager returns an error or raises an exception. This allows problematic events to be skipped, retried, or stop the process manager.
Allows your event handlers to handle exceptions by skipping, retrying, or stopping on problematic events.
@slashdotdash slashdotdash merged commit 23c2fe1 into master Aug 26, 2018
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@slashdotdash slashdotdash deleted the feature/event-handling-errors branch Aug 26, 2018
slashdotdash added a commit that referenced this pull request Aug 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant