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

microEndpoint in microErrorHandler doesn't seem useful #737

Open
geiseri opened this issue Mar 22, 2024 · 0 comments
Open

microEndpoint in microErrorHandler doesn't seem useful #737

geiseri opened this issue Mar 22, 2024 · 0 comments
Assignees
Labels
defect Suspected defect such as a bug or regression

Comments

@geiseri
Copy link

geiseri commented Mar 22, 2024

Observed behavior

This is not necessarily a defect, but is more of a suggestion. Feel free to close if it's not something that makes sense.

During compile I see the warning:

[build]  main.cpp:27:59: warning: unused parameter ‘ep’ [-Wunused-parameter]
[build]    27 | static void error_handler(microService *m, microEndpoint *ep, natsStatus s)

Since there is no obvious use for it I need to put in the annoying (void)ep; line to silence warnings. One suggested use would be to provide something like microRequest_GetEndpointState so the endpoint's context can be used for recovery from within the error handler.

Expected behavior

No warning presented, or provide utility to the value passed in.

Server and client version

Server: v2.10.7
Code: 3.7.0

Host environment

No response

Steps to reproduce

Set the callback function to microServiceConfig::ErrHandler and do not add the line (void)ep;

@geiseri geiseri added the defect Suspected defect such as a bug or regression label Mar 22, 2024
@levb levb self-assigned this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants