libgpiod
0.3.2
|
Error handling functions and macros. More...
Macros | |
#define | _GPIOD_ERRNO_OFFSET 10000 |
Private: offset for all libgpiod error numbers. | |
Enumerations | |
enum | { GPIOD_ESUCCESS = _GPIOD_ERRNO_OFFSET, GPIOD_EREQUEST, GPIOD_EEVREQUEST, GPIOD_EBULKINCOH, GPIOD_ELINEBUSY, GPIOD_ELINEMAX, _GPIOD_MAX_ERR } |
libgpiod-specific error numbers. More... | |
Functions | |
int | gpiod_errno (void) GPIOD_API |
Return last error. More... | |
const char * | gpiod_strerror (int errnum) GPIOD_API |
Convert error number to a human-readable string. More... | |
const char * | gpiod_last_strerror (void) GPIOD_API |
Convert the last libgpiod error number to a human-readable string. More... | |
Error handling functions and macros.
This library uses a combination of system-wide errno numbers and internal GPIO-specific errors. The routines in this section should be used to access the information about any error conditions that may occur.
With some noted exceptions, all libgpiod functions set the last error variable if an error occurs. Internally, the last_error variable has a separate instance per thread making the library thread-safe.
anonymous enum |
libgpiod-specific error numbers.
int gpiod_errno | ( | void | ) |
Return last error.
const char* gpiod_last_strerror | ( | void | ) |
Convert the last libgpiod error number to a human-readable string.
const char* gpiod_strerror | ( | int | errnum | ) |
Convert error number to a human-readable string.
errnum | Error number to convert. |