Add SR_ERR_TIMEOUT

This commit is contained in:
Bert Vermeulen 2013-06-13 14:23:06 +02:00
parent 5f2a4aff4b
commit 3e62166ed3
2 changed files with 7 additions and 0 deletions

View File

@ -84,6 +84,9 @@ SR_API const char *sr_strerror(int error_code)
case SR_ERR_DEV_CLOSED:
str = "device closed but should be open";
break;
case SR_ERR_TIMEOUT:
str = "timeout occurred";
break;
default:
str = "unknown error";
break;
@ -144,6 +147,9 @@ SR_API const char *sr_strerror_name(int error_code)
case SR_ERR_DEV_CLOSED:
str = "SR_ERR_DEV_CLOSED";
break;
case SR_ERR_TIMEOUT:
str = "SR_ERR_TIMEOUT";
break;
default:
str = "unknown error code";
break;

View File

@ -72,6 +72,7 @@ enum {
SR_ERR_SAMPLERATE = -5, /**< Incorrect samplerate. */
SR_ERR_NA = -6, /**< Not applicable. */
SR_ERR_DEV_CLOSED = -7, /**< Device is closed, but needs to be open. */
SR_ERR_TIMEOUT = -8, /**< A timeout occurred. */
/*
* Note: When adding entries here, don't forget to also update the