bes
Updated for version 3.20.5
|
Go to the documentation of this file.
15 #ifndef RAPIDJSON_ERROR_ERROR_H_
16 #define RAPIDJSON_ERROR_ERROR_H_
18 #include "../rapidjson.h"
22 RAPIDJSON_DIAG_OFF(padded)
38 #ifndef RAPIDJSON_ERROR_CHARTYPE
39 #define RAPIDJSON_ERROR_CHARTYPE char
51 #ifndef RAPIDJSON_ERROR_STRING
52 #define RAPIDJSON_ERROR_STRING(x) x
116 size_t Offset()
const {
return offset_; }
123 bool operator==(
const ParseResult& that)
const {
return code_ == that.code_; }
124 bool operator==(
ParseErrorCode code)
const {
return code_ == code; }
155 #endif // RAPIDJSON_ERROR_ERROR_H_
bool IsError() const
Whether the result is an error.
Invalid escape character in string.
void Set(ParseErrorCode code, size_t offset=0)
Update error code and offset.
Miss fraction part in number.
Incorrect hex digit after \u escape in string.
#define RAPIDJSON_ERROR_CHARTYPE
Character type of error messages.
ParseErrorCode
Error code of parsing.
ParseResult()
Default constructor, no error.
Missing a closing quotation mark in string.
size_t Offset() const
Get the error offset, if IsError(), 0 otherwise.
Missing a comma or ']' after an array element.
Number too big to be stored in double.
The surrogate pair in string is invalid.
Missing a colon after a name of object member.
ParseErrorCode Code() const
Get the error code.
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
Invalid encoding in string.
Missing a comma or '}' after an object member.
The document root must not follow by other values.
void Clear()
Reset error code.
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
Missing a name for object member.
Result of parsing (wraps ParseErrorCode)
ParseResult(ParseErrorCode code, size_t offset)
Constructor to set an error.