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

Implement a common setErrorMessage helper for urAdapterGetLastError #2386

Open
aarongreig opened this issue Nov 26, 2024 · 0 comments
Open
Labels
common Changes or additions to common utilities
Milestone

Comments

@aarongreig
Copy link
Contributor

To implement urAdapterGetLastError every adapter currently has almost exactly this code, with setErrorMessage and associated global variables in its respective common.cpp/common.hpp. Since these implementations are all so similar we should implement some kind of common helper to eliminate the repetition. Doing this cleanly is made complicated by the need for adapter-local global variables to store the error message and code in, as well as level zero's version of setErrorMessage being slightly different (it has an extra parameter and an extra global).

I started working on a change here to replace the helper function + globals with a helper class. At time of writing I haven't yet decided the cleanest way to support the extra stuff level zero needs.

@aarongreig aarongreig added the common Changes or additions to common utilities label Nov 26, 2024
@aarongreig aarongreig added this to the Backlog milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Changes or additions to common utilities
Projects
None yet
Development

No branches or pull requests

1 participant