3.2.6 Error handling
Most functions of the library that may fail have assh_status_t as return type. The function return value is used exclusively for error reporting. Any other value that need to be returned is passed using pointer parameters.
When a function call is successful, it returns the ASSH_OK value which is defined as 0. Additionally the ASSH_NO_DATA and ASSH_NOT_FOUND values can be reported by some specific functions of the API and are not considered as errors.
Any other non zero status indicates an error. This can be tested using the ASSH_SUCCESS macro. In case of error, the returned status is composed of two parts: the error code and the error severity that can be extracted by using the ASSH_STATUS and ASSH_SEVERITY macros respectively.