X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=error.c;h=8ccd17dfe337ef8d853556d93131c546e6ba2790;hb=cea26f6e9f1a58f28a4b790756a2f95dcf0eaa9d;hp=e3947a2f6409c0372521d7e024918361be4a1405;hpb=0223135bfb6771d7749fa39cff64a78c7a84a674;p=libsigrok.git diff --git a/error.c b/error.c index e3947a2f..8ccd17df 100644 --- a/error.c +++ b/error.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2012 Uwe Hermann * @@ -55,7 +55,7 @@ SR_API const char *sr_strerror(int error_code) const char *str; /* - * Note: All defined SR_* error macros from libsigrok.h should have + * Note: All defined SR_* error macros from libsigrok.h must have * an entry in this function, as well as in sr_strerror_name(). */ @@ -81,6 +81,12 @@ SR_API const char *sr_strerror(int error_code) case SR_ERR_NA: str = "not applicable"; break; + 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; @@ -112,7 +118,7 @@ SR_API const char *sr_strerror_name(int error_code) const char *str; /* - * Note: All defined SR_* error macros from libsigrok.h should have + * Note: All defined SR_* error macros from libsigrok.h must have * an entry in this function, as well as in sr_strerror(). */ @@ -138,6 +144,12 @@ SR_API const char *sr_strerror_name(int error_code) case SR_ERR_NA: str = "SR_ERR_NA"; break; + 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;