SR_ERR_IO: new error code
Add new error code which can be used to notify the user about general input/output errors. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
3cdff6cd2d
commit
3c5582595a
|
@ -76,6 +76,7 @@ enum sr_error_code {
|
|||
SR_ERR_TIMEOUT = -8, /**< A timeout occurred. */
|
||||
SR_ERR_CHANNEL_GROUP = -9, /**< A channel group must be specified. */
|
||||
SR_ERR_DATA =-10, /**< Data is invalid. */
|
||||
SR_ERR_IO =-11, /**< Input/output error. */
|
||||
|
||||
/*
|
||||
* Note: When adding entries here, don't forget to also update the
|
||||
|
|
|
@ -82,6 +82,8 @@ SR_API const char *sr_strerror(int error_code)
|
|||
return "no channel group specified";
|
||||
case SR_ERR_DATA:
|
||||
return "data is invalid";
|
||||
case SR_ERR_IO:
|
||||
return "input/output error";
|
||||
default:
|
||||
return "unknown error";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue