And developers never forget to check error codes.
Also error codes are part of the signature of a function, which exceptions aren‘t.
enum (class)? [[nodiscard]] Error {
Ok,
NoMem,
...
};
[1]: https://en.cppreference.com/w/cpp/language/attributes/nodisc... C attribute: nodiscard (since C23)
[1] https://en.cppreference.com/w/c/language/attributes/nodiscar...