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

Unified Error Codes for libdfi #724

Open
PengZheng opened this issue Feb 2, 2024 · 0 comments
Open

Unified Error Codes for libdfi #724

PengZheng opened this issue Feb 2, 2024 · 0 comments
Assignees
Labels
component/dfi Categorizes an issue or PR relevant to the DFI implementation. kind/improvement Categorizes issue or PR as related to improvements.

Comments

@PengZheng
Copy link
Contributor

PengZheng commented Feb 2, 2024

Intro

Currently each component (by component we mean .h/.c pair, which is borrowed from Lakos' Large Scale C++) in libdfi has its own error code definition:

In dyn_function.c, we have:

static const int OK = 0;
static const int ERROR = 1;

In dyn_type.c, there is:

static const int OK = 0;
static const int ERROR = 1;
static const int MEM_ERROR = 2;
static const int PARSE_ERROR = 3;

Unified Error Codes

Given that celix_status_t now support a custom facility error part, I think the int return can be upgraded to a celix_status_t. And because celix_status_t is a typedef to int, this maybe is even backwards compatible.

But this would be nice as a future enhancement and port of this pull request.

Originally posted by @pnoltes in #699 (comment)

@PengZheng PengZheng self-assigned this Feb 2, 2024
@PengZheng PengZheng added component/dfi Categorizes an issue or PR relevant to the DFI implementation. kind/improvement Categorizes issue or PR as related to improvements. labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/dfi Categorizes an issue or PR relevant to the DFI implementation. kind/improvement Categorizes issue or PR as related to improvements.
Projects
None yet
Development

No branches or pull requests

1 participant