Reflection for RapidJSON  0.0.3
Reflection for serializing/deserializing with RapidJSON
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ReflectiveRapidJSON::JsonDeserializationError Struct Reference

The JsonDeserializationError struct describes any errors of fromJson() except such caused by invalid JSON. More...

#include <errorhandling.h>

Public Member Functions

 JsonDeserializationError (JsonDeserializationErrorKind kind, JsonType expectedType, JsonType actualType, const char *record, const char *member=nullptr, std::size_t index=noIndex)
 Constructs a new JsonDeserializationError. More...
 

Public Attributes

JsonDeserializationErrorKind kind
 Which kind of error occured. More...
 
JsonType expectedType
 The expected type (might not be relevant for all error kinds). More...
 
JsonType actualType
 The actual type (might not be relevant for all error kinds). More...
 
const char * record
 The name of the class or struct which was being processed when the error was ascertained. More...
 
const char * member
 The name of the member which was being processed when the error was ascertained. More...
 
std::size_t index
 The index in the array which was being processed when the error was ascertained. More...
 

Static Public Attributes

static constexpr std::size_t noIndex = std::numeric_limits<std::size_t>::max()
 Indicates no array was being processed when the error occured. More...
 

Detailed Description

The JsonDeserializationError struct describes any errors of fromJson() except such caused by invalid JSON.

Definition at line 106 of file errorhandling.h.

Constructor & Destructor Documentation

◆ JsonDeserializationError()

ReflectiveRapidJSON::JsonDeserializationError::JsonDeserializationError ( JsonDeserializationErrorKind  kind,
JsonType  expectedType,
JsonType  actualType,
const char *  record,
const char *  member = nullptr,
std::size_t  index = noIndex 
)
inline

Constructs a new JsonDeserializationError.

Remarks
Supposed to be called by JsonDeserializationErrors::reportTypeMismatch() and similar methods of JsonDeserializationErrors.

Definition at line 131 of file errorhandling.h.

Member Data Documentation

◆ actualType

JsonType ReflectiveRapidJSON::JsonDeserializationError::actualType

The actual type (might not be relevant for all error kinds).

Definition at line 115 of file errorhandling.h.

◆ expectedType

JsonType ReflectiveRapidJSON::JsonDeserializationError::expectedType

The expected type (might not be relevant for all error kinds).

Definition at line 113 of file errorhandling.h.

◆ index

std::size_t ReflectiveRapidJSON::JsonDeserializationError::index

The index in the array which was being processed when the error was ascertained.

Definition at line 121 of file errorhandling.h.

◆ kind

JsonDeserializationErrorKind ReflectiveRapidJSON::JsonDeserializationError::kind

Which kind of error occured.

Definition at line 111 of file errorhandling.h.

◆ member

const char* ReflectiveRapidJSON::JsonDeserializationError::member

The name of the member which was being processed when the error was ascertained.

Definition at line 119 of file errorhandling.h.

◆ noIndex

constexpr std::size_t ReflectiveRapidJSON::JsonDeserializationError::noIndex = std::numeric_limits<std::size_t>::max()
static

Indicates no array was being processed when the error occured.

Definition at line 124 of file errorhandling.h.

◆ record

const char* ReflectiveRapidJSON::JsonDeserializationError::record

The name of the class or struct which was being processed when the error was ascertained.

Definition at line 117 of file errorhandling.h.


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