Classes | |
| struct | ParseResult |
| Result of parsing (wraps ParseErrorCode). More... | |
Macros | |
| #define | RAPIDJSON_ERROR_CHARTYPE char |
| Character type of error messages. | |
| #define | RAPIDJSON_ERROR_STRING(x) |
| Macro for converting string literal to RAPIDJSON_ERROR_CHARTYPE[]. | |
| #define | RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset) |
| Macro to indicate a parse error. | |
| #define | RAPIDJSON_PARSE_ERROR(parseErrorCode, offset) |
| (Internal) macro to indicate and handle a parse error. | |
Typedefs | |
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* | GetParseErrorFunc) (ParseErrorCode) |
| Function pointer type of GetParseError(). | |
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* | GetValidateErrorFunc) (ValidateErrorCode) |
| Function pointer type of GetValidateError(). | |
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* | GetSchemaErrorFunc) (SchemaErrorCode) |
| Function pointer type of GetSchemaError(). | |
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* | GetPointerParseErrorFunc) (PointerParseErrorCode) |
| Function pointer type of GetPointerParseError(). | |
Functions | |
| RAPIDJSON_NAMESPACE_BEGIN const RAPIDJSON_ERROR_CHARTYPE * | GetParseError_En (ParseErrorCode parseErrorCode) |
| Maps error code of parsing into error message. | |
| const RAPIDJSON_ERROR_CHARTYPE * | GetValidateError_En (ValidateErrorCode validateErrorCode) |
| Maps error code of validation into error message. | |
| const RAPIDJSON_ERROR_CHARTYPE * | GetSchemaError_En (SchemaErrorCode schemaErrorCode) |
| Maps error code of schema document compilation into error message. | |
| const RAPIDJSON_ERROR_CHARTYPE * | GetPointerParseError_En (PointerParseErrorCode pointerParseErrorCode) |
| Maps error code of pointer parse into error message. | |
| #define RAPIDJSON_ERROR_CHARTYPE char |
Character type of error messages.
The default character type is char. On Windows, user can define this macro as TCHAR for supporting both unicode/non-unicode settings.
Definition at line 40 of file error.h.
Referenced by GetParseError_En(), GetPointerParseError_En(), GetSchemaError_En(), and GetValidateError_En().
| #define RAPIDJSON_ERROR_STRING | ( | x | ) |
Macro for converting string literal to RAPIDJSON_ERROR_CHARTYPE[].
By default this conversion macro does nothing. On Windows, user can define this macro as _T(x) for supporting both unicode/non-unicode settings.
Definition at line 53 of file error.h.
Referenced by GetParseError_En(), GetPointerParseError_En(), GetSchemaError_En(), and GetValidateError_En().
| #define RAPIDJSON_PARSE_ERROR | ( | parseErrorCode, | |
| offset ) |
(Internal) macro to indicate and handle a parse error.
| parseErrorCode | rapidjson::ParseErrorCode of the error |
| offset | position of the error in JSON input (size_t) |
Invokes RAPIDJSON_PARSE_ERROR_NORETURN and stops the parsing.
| #define RAPIDJSON_PARSE_ERROR_NORETURN | ( | parseErrorCode, | |
| offset ) |
Macro to indicate a parse error.
| parseErrorCode | rapidjson::ParseErrorCode of the error |
| offset | position of the error in JSON input (size_t) |
This macros can be used as a customization point for the internal error handling mechanism of RapidJSON.
A common usage model is to throw an exception instead of requiring the caller to explicitly check the rapidjson::GenericReader::Parse's return value:
Definition at line 101 of file reader.h.
Referenced by GenericReader< UTF8< char >, UTF8< char >, CrtAllocator >::Parse().
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* GetParseErrorFunc) (ParseErrorCode) |
Function pointer type of GetParseError().
This is the prototype for GetParseError_X(), where X is a locale. User can dynamically change locale in runtime, e.g.:
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* GetPointerParseErrorFunc) (PointerParseErrorCode) |
Function pointer type of GetPointerParseError().
This is the prototype for GetPointerParseError_X(), where X is a locale. User can dynamically change locale in runtime, e.g.:
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* GetSchemaErrorFunc) (SchemaErrorCode) |
Function pointer type of GetSchemaError().
This is the prototype for GetSchemaError_X(), where X is a locale. User can dynamically change locale in runtime, e.g.:
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* GetValidateErrorFunc) (ValidateErrorCode) |
Function pointer type of GetValidateError().
This is the prototype for GetValidateError_X(), where X is a locale. User can dynamically change locale in runtime, e.g.:
| enum ParseErrorCode |
Error code of parsing.
Error code of JSON pointer parsing.
| enum SchemaErrorCode |
Error codes when validating.
| enum ValidateErrorCode |
Error codes when validating.
|
inline |
Maps error code of parsing into error message.
| parseErrorCode | Error code obtained in parsing. |
Definition at line 37 of file en.h.
References kParseErrorArrayMissCommaOrSquareBracket, kParseErrorDocumentEmpty, kParseErrorDocumentRootNotSingular, kParseErrorNone, kParseErrorNumberMissExponent, kParseErrorNumberMissFraction, kParseErrorNumberTooBig, kParseErrorObjectMissColon, kParseErrorObjectMissCommaOrCurlyBracket, kParseErrorObjectMissName, kParseErrorStringEscapeInvalid, kParseErrorStringInvalidEncoding, kParseErrorStringMissQuotationMark, kParseErrorStringUnicodeEscapeInvalidHex, kParseErrorStringUnicodeSurrogateInvalid, kParseErrorTermination, kParseErrorUnspecificSyntaxError, kParseErrorValueInvalid, RAPIDJSON_ERROR_CHARTYPE, and RAPIDJSON_ERROR_STRING.
|
inline |
Maps error code of pointer parse into error message.
| pointerParseErrorCode | Error code obtained from pointer parse. |
Definition at line 158 of file en.h.
References kPointerParseErrorCharacterMustPercentEncode, kPointerParseErrorInvalidEscape, kPointerParseErrorInvalidPercentEncoding, kPointerParseErrorNone, kPointerParseErrorTokenMustBeginWithSolidus, RAPIDJSON_ERROR_CHARTYPE, and RAPIDJSON_ERROR_STRING.
|
inline |
Maps error code of schema document compilation into error message.
| schemaErrorCode | Error code obtained from compiling the schema document. |
Definition at line 128 of file en.h.
References kSchemaErrorNone, kSchemaErrorReadOnlyAndWriteOnly, kSchemaErrorRefCyclical, kSchemaErrorRefInvalid, kSchemaErrorRefNoRemoteProvider, kSchemaErrorRefNoRemoteSchema, kSchemaErrorRefPlainName, kSchemaErrorRefPointerInvalid, kSchemaErrorRefUnknown, kSchemaErrorRegexInvalid, kSchemaErrorSpecIllegal, kSchemaErrorSpecUnknown, kSchemaErrorSpecUnsupported, kSchemaErrorStartUnknown, RAPIDJSON_ERROR_CHARTYPE, and RAPIDJSON_ERROR_STRING.
|
inline |
Maps error code of validation into error message.
| validateErrorCode | Error code obtained from validator. |
Definition at line 77 of file en.h.
References kValidateErrorAdditionalItems, kValidateErrorAdditionalProperties, kValidateErrorAllOf, kValidateErrorAnyOf, kValidateErrorDependencies, kValidateErrorEnum, kValidateErrorExclusiveMaximum, kValidateErrorExclusiveMinimum, kValidateErrorMaximum, kValidateErrorMaxItems, kValidateErrorMaxLength, kValidateErrorMaxProperties, kValidateErrorMinimum, kValidateErrorMinItems, kValidateErrorMinLength, kValidateErrorMinProperties, kValidateErrorMultipleOf, kValidateErrorNone, kValidateErrorNot, kValidateErrorOneOf, kValidateErrorOneOfMatch, kValidateErrorPattern, kValidateErrorPatternProperties, kValidateErrorReadOnly, kValidateErrorRequired, kValidateErrors, kValidateErrorType, kValidateErrorUniqueItems, kValidateErrorWriteOnly, RAPIDJSON_ERROR_CHARTYPE, and RAPIDJSON_ERROR_STRING.