$darkmode
Elektra 0.11.0
Error Handling

Problem

There are ambiguous cases where the same return value can refer to multiple problems:

Constraints

We also have to consider that many parts of the API very constrained in what values they can use for error codes. If a function returns a pointer the only possible error value by definition is NULL.

Assumptions

Considered Alternatives

Decision

Rationale

This simplifies and unifies error reporting across all functions. It also introduces a default way for the developers to handle error reporting. Developers of bindings for Elektra can rely on the existing error reporting feature without having to introduce custom error messages, that can vary wildly between different bindings.

Implications

Related Decisions

Notes