18#define CLAP_ERR_NONE 0
19#define CLAP_ERR_INVALID_ARGUMENT 1
20#define CLAP_ERR_MISSING_VALUE 2
21#define CLAP_ERR_TYPE_CONVERSION 3
22#define CLAP_ERR_INVALID_CHOICE 4
23#define CLAP_ERR_MUTUALLY_EXCLUSIVE 5
24#define CLAP_ERR_REQUIRED_MISSING 6
25#define CLAP_ERR_UNRECOGNIZED 7
26#define CLAP_ERR_TOO_MANY_ARGS 8
27#define CLAP_ERR_TOO_FEW_ARGS 9
28#define CLAP_ERR_MEMORY 10
29#define CLAP_ERR_SUBCOMMAND_FAILED 11
30#define CLAP_ERR_DEPENDENCY_VIOLATION 12
31#define CLAP_ERR_CUSTOM 100
CLAP_EXPORT int clap_error_code(const clap_error_t *error)
Get the error code from an error structure.
CLAP_EXPORT const char * clap_error_message(const clap_error_t *error)
Get the human-readable message from an error structure.
CLAP_EXPORT void clap_error_set(clap_error_t *error, int code, const char *format,...)
Set error code and printf-style message.
struct clap_error_s clap_error_t
Error information structure.
Symbol export/import macros for libclap.
#define CLAP_EXPORT
Definition clap_export.h:42
Error information structure.
Definition clap_error.h:36
int code
Definition clap_error.h:37
const char * invalid_value
Definition clap_error.h:40
char message[512]
Definition clap_error.h:38
const char * argument_name
Definition clap_error.h:39
const char * subcommand_name
Definition clap_error.h:41