json-gen-c  0.1.5
json-gen-c generate C code for json manipulation
error_codes.h File Reference

Unified error code definitions for json-gen-c. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  json_gen_error_t {
  JSON_GEN_SUCCESS = 0 , JSON_GEN_ERROR_GENERAL = -1 , JSON_GEN_ERROR_MEMORY = -2 , JSON_GEN_ERROR_FILE_IO = -3 ,
  JSON_GEN_ERROR_PARSE = -4 , JSON_GEN_ERROR_INVALID_PARAM = -5 , JSON_GEN_ERROR_BUFFER_OVERFLOW = -6 , JSON_GEN_ERROR_FORMAT = -7 ,
  JSON_GEN_ERROR_NOT_FOUND = -8 , JSON_GEN_ERROR_THREAD_SAFETY = -9 , JSON_GEN_ERROR_BOUNDS = -10
}
 Error codes for json-gen-c operations. More...
 

Functions

const char * json_gen_error_string (json_gen_error_t error_code)
 Get error message string for error code.
 

Detailed Description

Unified error code definitions for json-gen-c.

Enumeration Type Documentation

◆ json_gen_error_t

Error codes for json-gen-c operations.

Enumerator
JSON_GEN_SUCCESS 

Operation completed successfully

JSON_GEN_ERROR_GENERAL 

General error

JSON_GEN_ERROR_MEMORY 

Memory allocation error

JSON_GEN_ERROR_FILE_IO 

File I/O error

JSON_GEN_ERROR_PARSE 

Parsing error

JSON_GEN_ERROR_INVALID_PARAM 

Invalid parameter

JSON_GEN_ERROR_BUFFER_OVERFLOW 

Buffer overflow

JSON_GEN_ERROR_FORMAT 

Format error

JSON_GEN_ERROR_NOT_FOUND 

Resource not found

JSON_GEN_ERROR_THREAD_SAFETY 

Thread safety violation

JSON_GEN_ERROR_BOUNDS 

Boundary condition violation

Function Documentation

◆ json_gen_error_string()

const char * json_gen_error_string ( json_gen_error_t  error_code)

Get error message string for error code.

Parameters
error_codeThe error code
Returns
Human-readable error message