/*
- * This file is part of the sigrok project.
+ * This file is part of the libsigrok project.
*
* Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
*
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().
*/
case SR_ERR_MALLOC:
str = "memory allocation error";
break;
+ case SR_ERR_ARG:
+ str = "invalid argument";
+ break;
case SR_ERR_BUG:
str = "internal error";
break;
case SR_ERR_SAMPLERATE:
str = "invalid samplerate";
break;
+ case SR_ERR_NA:
+ str = "not applicable";
+ break;
+ case SR_ERR_DEV_CLOSED:
+ str = "device closed but should be open";
+ break;
default:
str = "unknown error";
break;
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().
*/
case SR_ERR_MALLOC:
str = "SR_ERR_MALLOC";
break;
+ case SR_ERR_ARG:
+ str = "SR_ERR_ARG";
+ break;
case SR_ERR_BUG:
str = "SR_ERR_BUG";
break;
case SR_ERR_SAMPLERATE:
str = "SR_ERR_SAMPLERATE";
break;
+ case SR_ERR_NA:
+ str = "SR_ERR_NA";
+ break;
+ case SR_ERR_DEV_CLOSED:
+ str = "SR_ERR_DEV_CLOSED";
+ break;
default:
str = "unknown error code";
break;