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

Support adding additional error handling to generated actors #2141

Merged
merged 2 commits into from
Nov 9, 2024

Conversation

benbenwilde
Copy link
Contributor

Description

Currently, if you want to log whenever a generated actor throws an error while handling a message, you have to override the long form of every message handler. This adds an OnError virtual method so that you can easily add logging or any other behavior in one place.

This change maintains exact behavior from before, as the default implementation of OnError does the same thing that the passed in onError callback always does. Even though the onError parameter is now technically redundant, it is retained to keep behavior of existing overrides unchanged.

Purpose

This pull request is a:

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@rogeralsing rogeralsing merged commit 7193337 into asynkron:dev Nov 9, 2024
18 checks passed
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.

2 participants