json-c: json_patch_error Struct Reference

json-c 0.19

Data Fields
json_patch_error Struct Reference

`#include <json_patch.h>`

## Data Fields
int | errno_code
size_t | patch_failure_idx
const char * | errmsg

## Detailed Description

Details of an error that occurred during json_patch_apply()

## Field Documentation

## ◆ errmsg

const char* json_patch_error::errmsg

A human readable error message. Allocated from static storage, does not need to be freed.

## ◆ errno_code

int json_patch_error::errno_code

An errno value indicating what kind of error occurred. Possible values include:

- ENOENT - A path referenced in the operation does not exist.
- EINVAL - An invalid operation or with invalid path was attempted
- ENOMEM - Unable to allocate memory
- EFAULT - Invalid arguments were passed to json_patch_apply() (i.e. a C API error, vs. a data error like EINVAL)

## ◆ patch_failure_idx

size_t json_patch_error::patch_failure_idx

The index into the patch array of the operation that failed, or SIZE_T_MAX for overall errors.

The documentation for this struct was generated from the following file:

- json_patch.h