Skip to content

Implement a common setErrorMessage helper for urAdapterGetLastError #2386

Open
@aarongreig

Description

@aarongreig

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    commonChanges or additions to common utilities

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions