Classes | |
| struct | ParseResult |
| Result of parsing (wraps ParseErrorCode) More... | |
Macros | |
| #define | RAPIDJSON_ERROR_CHARTYPE char |
| Character type of error messages. More... | |
| #define | RAPIDJSON_ERROR_STRING(x) x |
| Macro for converting string literial to RAPIDJSON_ERROR_CHARTYPE[]. More... | |
| #define | RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset) |
| Macro to indicate a parse error. More... | |
| #define | RAPIDJSON_PARSE_ERROR(parseErrorCode, offset) |
| (Internal) macro to indicate and handle a parse error. More... | |
Typedefs | |
| typedef const RAPIDJSON_ERROR_CHARTYPE *(* | GetParseErrorFunc) (ParseErrorCode) |
| Function pointer type of GetParseError(). More... | |
Functions | |
| RAPIDJSON_NAMESPACE_BEGIN const RAPIDJSON_ERROR_CHARTYPE * | GetParseError_En (ParseErrorCode parseErrorCode) |
| Maps error code of parsing into error message. More... | |
| #define RAPIDJSON_ERROR_CHARTYPE char |
| #define RAPIDJSON_ERROR_STRING | ( | x | ) | x |
Macro for converting string literial 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.
| #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:
| 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.:
| enum ParseErrorCode |
Error code of parsing.
Definition at line 64 of file error.h.
Error code of parsing.
| Enumerator | |
|---|---|
| kPointerParseErrorNone |
The parse is successful. |
| kPointerParseErrorTokenMustBeginWithSolidus |
A token must begin with a '/'. |
| kPointerParseErrorInvalidEscape |
Invalid escape. |
| kPointerParseErrorInvalidPercentEncoding |
Invalid percent encoding in URI fragment. |
| kPointerParseErrorCharacterMustPercentEncode |
A character must percent encoded in URI fragment. |
Definition at line 37 of file pointer.h.
|
inline |
Maps error code of parsing into error message.
| parseErrorCode | Error code obtained in parsing. |
Definition at line 36 of file en.h.
1.8.11