The error module can provide a system that extends the errno system of the C standard library. It consists in 2 parts:
So one has to first register all the error messages that a program or a library should manage. Then, when an error occurs, use eina_error_set(), and when errors are managed, use eina_error_get(). If eina_error_set() is used to set an error, do not forget to remove previous set errors before calling eina_error_set().
Here is an example for use:
Of course, instead of printf(), eina_log_print() can be used to have beautiful error messages.