GTK-inspired error handling.
More...
GTK-inspired error handling.
By convention, functions in bio will take a bio_error_t when an error might happen:
}
bool bio_fstat(bio_file_t file, bio_stat_t *stat, bio_error_t *error)
Retrieves statistics about a file.
#define BIO_ERROR(...)
Log a message at BIO_LOG_LEVEL_ERROR level.
Definition bio.h:54
#define BIO_ERROR_FMT_ARGS(error)
Helper for logging a bio_error_t.
Definition bio.h:80
#define BIO_ERROR_FMT
Helper for logging a bio_error_t.
Definition bio.h:73
An error returned from a function.
Definition bio.h:468
It is valid to pass NULL
to these functions when there is no interest for error details.
◆ bio_core_error_code_t
Core error codes.
Enumerator |
---|
BIO_NO_ERROR | There is no error.
|
BIO_ERROR_INVALID_ARGUMENT | An invalid argument was provided.
|
BIO_ERROR_NOT_SUPPORTED | The operation is not supported.
|
◆ bio_clear_error()
Convenient function to clear an error object.
◆ bio_has_error()
Convenient function to check whether an error was encountered.
◆ bio_strerror()
static const char * bio_strerror |
( |
bio_error_t * |
error | ) |
|
|
inlinestatic |
Convenient function to format an error into a string.
The returned buffer is managed by bio. It is guaranteed to be valid until another call to bio_strerror is made.
- See also
- BIO_ERROR_FMT
◆ BIO_CORE_ERROR