util_errors.h revision fcbcfa69f9291936f01f24b5fcb5a7672dca46f3
1231N/A This program is free software; you can redistribute it and/or modify 1231N/A it under the terms of the GNU General Public License as published by 1231N/A the Free Software Foundation; either version 3 of the License, or 1231N/A (at your option) any later version. 1231N/A This program is distributed in the hope that it will be useful, 1231N/A but WITHOUT ANY WARRANTY; without even the implied warranty of 1231N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1231N/A GNU General Public License for more details. 1231N/A You should have received a copy of the GNU General Public License 1231N/A Simo Sorce <ssorce@redhat.com> 1516N/A * We define a specific number space so that we do not overlap with other 1231N/A * generic errors returned by various libraries. This will make it easy 1231N/A * to have functions that double check that what was returned was a SSSD 1580N/A * specific error where it matters. For example we may want to ensure some 1231N/A * particularly sensitive paths only return SSSD sepcific errors as that 1231N/A * will insure all error conditions have been explicitly dealt with, 1231N/A * and are not the result of assigning the wrong return result. 1580N/A * Basic system errno errors can still be used, but when an error condition 1674N/A * does not properly map to a system error we should use a SSSD specific one 1933N/A/* never use ERR_INVALID, it is used for catching and returning 1231N/A * information on invalid error numbers */ 1580N/A/* never use ERR_LAST, this represent the maximum error value available 1580N/A * and is used to validate error codes */ 2221N/A * @brief return a string descriing the error number like strerror() 3177N/A * @param error An errno_t number, can be a SSSD error or a system error 2221N/A * @return A statically allocated string. 2381N/A#
endif /* __SSSD_UTIL_ERRORS_H__ */