Skip to content

Process manager and event handler error & exception handling - #192

Merged
slashdotdash merged 2 commits into
masterfrom
feature/event-handling-errors
Aug 26, 2018
Merged

Process manager and event handler error & exception handling#192
slashdotdash merged 2 commits into
masterfrom
feature/event-handling-errors

Conversation

@slashdotdash

Copy link
Copy Markdown
Member

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
@slashdotdash
slashdotdash deleted the feature/event-handling-errors branch August 26, 2018 22:15
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant