]> sigrok.org Git - libsigrok.git/blobdiff - src/error.c
sr_strerror_name(): Add missing SR_ERR_IO entry.
[libsigrok.git] / src / error.c
index a8a46503e4754d4a09257791ecf4aa4e15596206..0d43abf16b544780c40105f62e5d6b8e391a3aab 100644 (file)
@@ -58,6 +58,8 @@ SR_API const char *sr_strerror(int error_code)
         */
 
        switch (error_code) {
+       case SR_OK_CONTINUE:
+               return "not enough data to decide error status yet";
        case SR_OK:
                return "no error";
        case SR_ERR:
@@ -80,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";
        }
@@ -111,6 +115,8 @@ SR_API const char *sr_strerror_name(int error_code)
         */
 
        switch (error_code) {
+       case SR_OK_CONTINUE:
+               return "SR_OK_CONTINUE";
        case SR_OK:
                return "SR_OK";
        case SR_ERR:
@@ -131,6 +137,10 @@ SR_API const char *sr_strerror_name(int error_code)
                return "SR_ERR_TIMEOUT";
        case SR_ERR_CHANNEL_GROUP:
                return "SR_ERR_CHANNEL_GROUP";
+       case SR_ERR_DATA:
+               return "SR_ERR_DATA";
+       case SR_ERR_IO:
+               return "SR_ERR_IO";
        default:
                return "unknown error code";
        }