Skip to content

client manager: added user context to error handler (#424) #425

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

gabbla
Copy link
Contributor

@gabbla gabbla commented May 8, 2024

Pull request

Choose Correct

  • bug
  • feature

Describe the pull request

This pull request addresses and propose a possible implementation regarding the feature request presented in #424

To Reproduce

When registering an error handler, the user can supply its own context (or nullptr).

Steps you didn't forgot to do

  • I checked if other PR isn't solving this issue.
  • I read Contribution details and did appropriate actions.
  • PR code is tested.
  • PR code is formatted.
  • Allow edits from maintainers pull request option is set (recommended).

Additional context

Copy link
Contributor

@amgross amgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding context when it is not critical is probably not best practice and this change is API breaking.
I would suggest if you need just to create separate handler for each client and they all can call single function with context they will provide.
Also if want to go with this approach probably need to modify also erpc_client_set_error_handler and erpc_arbitrated_client_set_error_handler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants