Process manager and event handler error & exception handling #192
Allow exceptions and errors during event handling to be handled by
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.